Instructions to use jacepark12/LFM2.5-2.6B-Terminal-SFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jacepark12/LFM2.5-2.6B-Terminal-SFT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jacepark12/LFM2.5-2.6B-Terminal-SFT") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jacepark12/LFM2.5-2.6B-Terminal-SFT") model = AutoModelForCausalLM.from_pretrained("jacepark12/LFM2.5-2.6B-Terminal-SFT", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jacepark12/LFM2.5-2.6B-Terminal-SFT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jacepark12/LFM2.5-2.6B-Terminal-SFT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jacepark12/LFM2.5-2.6B-Terminal-SFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jacepark12/LFM2.5-2.6B-Terminal-SFT
- SGLang
How to use jacepark12/LFM2.5-2.6B-Terminal-SFT with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "jacepark12/LFM2.5-2.6B-Terminal-SFT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jacepark12/LFM2.5-2.6B-Terminal-SFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "jacepark12/LFM2.5-2.6B-Terminal-SFT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jacepark12/LFM2.5-2.6B-Terminal-SFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jacepark12/LFM2.5-2.6B-Terminal-SFT with Docker Model Runner:
docker model run hf.co/jacepark12/LFM2.5-2.6B-Terminal-SFT
LFM2.5-2.6B Terminal SFT
Full-parameter supervised fine-tuning of LiquidAI/LFM2.5-2.6B for terminal-agent tasks.
The experiment reproduces the Phase 1 configuration in Liquid-CLI's
train_unsloth_processed.py, changing only the base model and using native
Transformers/TRL FlashAttention support for LFM2.5.
Training data
139,841 non-coding terminal-agent conversations prepared from the
skill_based_easy, skill_based_medium, and skill_based_mixed configurations
of nvidia/Nemotron-Terminal-Corpus using Liquid-CLI's prepare_data.py.
Training configuration
- Full-parameter BF16 fine-tuning
- Sequence length: 4,096
- Packing: enabled
- Assistant-only loss: enabled
- Per-device batch size: 4
- Gradient accumulation: 32 (effective batch size 128)
- Epochs: 1
- Learning rate: 2e-5
- Optimizer: AdamW 8-bit
- Warmup steps: 10
- Weight decay: 0.01
- Scheduler: linear
- Seed: 3407
- Attention: FlashAttention 2
- Hardware: 1x NVIDIA H100 80GB
Training results
- Optimizer steps: 1,092 / 1,092
- Final epoch: 1.0
- Training loss: 0.2867
- Mean token accuracy: 0.8947
- Tokens processed: 544,812,939
- Training runtime: 34,353 seconds (about 9 hours 33 minutes)
Source
- Downloads last month
- 172
Model tree for jacepark12/LFM2.5-2.6B-Terminal-SFT
Dataset used to train jacepark12/LFM2.5-2.6B-Terminal-SFT
Viewer • Updated • 366k • 6.32k • 141