Langtrain Logo
Langtrain Docs
GuidesAPI referenceSDKs
GitHubOpen the app

Search documentation

Jump to any docs page

  • Overview
  • Models
  • Datasets
  • Fine-tuning
  • Evaluation
GitHub

Models

Langtrain fine-tunes open models from Hugging Face. Choosing the right one matters more than any training setting.

What you can train

Open text-generation models that Hugging Face Transformers and PEFT support: Llama, Mistral, Qwen, Gemma, Phi and others. Pass the model's Hugging Face ID to from_pretrained. For models that read images, use Langvision.
python
1model, tokenizer = FastLanguageModel.from_pretrained("Qwen/Qwen2.5-7B-Instruct", load_in_4bit=True)

Instruct or base

Start from the instruct (or chat) version for assistants and anything conversational: it already follows instructions, so your data only has to teach your task. Use a base model when you are teaching raw text completion or plan to train with ORPO, which includes SFT.

Size

Start small and move up only if it isn't good enough. 1B to 3B models handle narrow jobs (classification, extraction, fixed formats) and run on a laptop. 7B to 8B models are the usual choice for assistants. Bigger models write better but cost more to train and serve.

Memory

Rough GPU memory to fine-tune with QLoRA, plus some headroom for longer examples:
  • –1B to 3B - 8 GB
  • –7B to 8B - 16 GB
  • –13B to 14B - 24 GB
  • –70B - 48 to 80 GB

Licences

Your fine-tune inherits the base model's licence. Mistral and Qwen models are mostly Apache 2.0; Llama and Gemma have their own terms. Gated models need you to accept the licence on Hugging Face and log in with huggingface-cli login before they download.
PreviousOverviewNextDatasets