Skip to content

Conversation

@howard0su
Copy link
Contributor

Like to get early feedback to adding fine tunning interface to llama.h.

  1. Leverage same code for compute graph
  2. leverage same model class to store the weights including LoRA weights

Questions to get feedback:

  1. shall we have finetune context instead of llama_context today?
  2. shall we have simple function to complete hide training? I feel it may miss the feature like using grammar CFG to finetune model.

@howard0su howard0su changed the title Llama train interface Llama training finetuning interface Jul 17, 2023
Copy link
Member

@ggerganov ggerganov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, though it's hard to tell what's the best approach.
I see you are applying LoRA at runtime. Can you make a prototype for loading the optional LoRA tensors and measure what is the performance difference compared to applying the LoRA once at the start?

LLAMA_API int llama_eval_export(struct llama_context * ctx, const char * fname);

// Enable finetune on the context, flags indicate what type of finetune
LLAMA_API int llama_enable_finetune(struct llama_context * ctx, enum llama_finetune_type flags);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LLAMA_API int llama_enable_finetune(struct llama_context * ctx, enum llama_finetune_type flags);
LLAMA_API int llama_finetune_enable(struct llama_context * ctx, enum llama_finetune_type flags);

@daboe01 daboe01 mentioned this pull request Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants