Skip to content

Add decoder-only LLM fine-tuning path (LoRA/QLoRA)#1109

Open
ddaspit wants to merge 1 commit into
masterfrom
llm-finetuning
Open

Add decoder-only LLM fine-tuning path (LoRA/QLoRA)#1109
ddaspit wants to merge 1 commit into
masterfrom
llm-finetuning

Conversation

@ddaspit

@ddaspit ddaspit commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator
  • Add LLMConfig/LLMModel for decoder-only causal LMs (full/LoRA/QLoRA), dispatched from config_utils on model_type: llm
  • Reuse the existing preprocess/test/translate/experiment pipeline via the Config/NMTModel interfaces; chat-template prompts with prompt-only label masking
  • Lift shared checkpoint resolution, effective-config, and inference-cache logic into the Config/NMTModel base classes
  • Rename hugging_face_config.py -> seq2seq_config.py (Seq2SeqConfig/Seq2SeqNMTModel)
  • Add bitsandbytes as an optional llm extra for QLoRA
  • Add smoke tests, fixtures, and unit tests for the LLM path

This change is Reviewable

- Add LLMConfig/LLMModel for decoder-only causal LMs (full/LoRA/QLoRA),
  dispatched from config_utils on `model_type: llm`
- Reuse the existing preprocess/test/translate/experiment pipeline via the
  Config/NMTModel interfaces; chat-template prompts with prompt-only label masking
- Lift shared checkpoint resolution, effective-config, and inference-cache logic
  into the Config/NMTModel base classes
- Rename hugging_face_config.py -> seq2seq_config.py (Seq2SeqConfig/Seq2SeqNMTModel)
- Add bitsandbytes as an optional `llm` extra for QLoRA
- Add smoke tests, fixtures, and unit tests for the LLM path

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ddaspit

ddaspit commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

This PR adds general support for LLMs. There is a little bit more work that is needed to support TranslateGemma and some other models. A newer version of transformers is needed. TranslateGemma is a vision language model, i.e. it supports both text and image input. These means we will need to add support for AutoModelForImageTextToText to LLMModel. TranslateGemma is a gated model on HF Hub, so we will need a HuggingFace token when the docker image is run on ClearML.

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.

1 participant