Views
No views yet
LiquidAI/LFM2.5-1.2B-Instruct.| Base model | LiquidAI/LFM2.5-1.2B-Instruct |
| Architecture | Lfm2ForCausalLM |
| Parameters | 1.2B |
| Method | LoRA supervised fine-tuning via Unsloth + TRL |
| License | other (inherited from the base model) |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_id = "ermiaazarkhalili/LFM2.5-1.2B-SFT-Claude-Opus-Reasoning"
4tokenizer = AutoTokenizer.from_pretrained(model_id)
5model = AutoModelForCausalLM.from_pretrained(model_id, dtype='auto', device_map='auto')
6
7messages = [{"role": "user", "content": "Explain gradient checkpointing in two sentences."}]
8inputs = tokenizer.apply_chat_template(
9 messages, add_generation_prompt=True, return_tensors='pt'
10).to(model.device)
11
12outputs = model.generate(inputs, max_new_tokens=256)
13print(tokenizer.decode(outputs[0], skip_special_tokens=True))| Setting | Value |
|---|---|
| LoRA rank (r) | 16 |
| LoRA alpha | 32 |
| Learning rate | 2e-05 |
| Epochs | 1 |
| Effective batch size | 8 (2 x 4 grad accum) |
| Base precision | 4-bit (QLoRA) |
notebooks/sft_distillation_lfm2.5.ipynb, executed non-interactively with
papermill on a SLURM H100 partition (Unsloth + TRL, LoRA).scripts/generate_hub_model_card.py.