Instructions to use LiquidAI/LFM2.5-1.2B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LiquidAI/LFM2.5-1.2B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LiquidAI/LFM2.5-1.2B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LiquidAI/LFM2.5-1.2B-Instruct") model = AutoModelForCausalLM.from_pretrained("LiquidAI/LFM2.5-1.2B-Instruct", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LiquidAI/LFM2.5-1.2B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LiquidAI/LFM2.5-1.2B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LiquidAI/LFM2.5-1.2B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LiquidAI/LFM2.5-1.2B-Instruct
- SGLang
How to use LiquidAI/LFM2.5-1.2B-Instruct 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 "LiquidAI/LFM2.5-1.2B-Instruct" \ --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": "LiquidAI/LFM2.5-1.2B-Instruct", "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 "LiquidAI/LFM2.5-1.2B-Instruct" \ --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": "LiquidAI/LFM2.5-1.2B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use LiquidAI/LFM2.5-1.2B-Instruct with Docker Model Runner:
docker model run hf.co/LiquidAI/LFM2.5-1.2B-Instruct
Commit History
Yesterday
-
Add IFBench evaluation result
Verified signature# Add IFBench evaluation result ## Summary This PR adds the IFBench score reported for `LiquidAI/LFM2.5-1.2B-Instruct` to `.eval_results/`, following the [Hugging Face Hub evaluation-results specification](https://huggingface.co/docs/hub/eval-results). IFBench ([allenai/IFBench_test](https://huggingface.co/datasets/allenai/IFBench_test)) is now an official Hub benchmark, with prompt-level loose accuracy as its headline metric. ## Benchmarks Added - [IFBench](https://huggingface.co/datasets/allenai/IFBench_test?eval_result=LiquidAI/LFM2.5-1.2B-Instruct&leaderboard_task_id=prompt_level_loose): 47.33 ## Source - Model card: https://huggingface.co/LiquidAI/LFM2.5-1.2B-Instruct (row: "IFBench") ## Files Added - `.eval_results/ifbench.yaml` ## Verification This score is self-reported in the source above; no verified token is provided because it was not run via HF Jobs with inspect-ai. The Hub task is prompt-level loose accuracy (0-100). If your number was computed with a different …ed64424 -
Update README.md
Verified signature51d0915
-
Add DSpark
Verified signature0f604ad
-
Fix chat template: render assistant tool_calls (#20)
- Fix chat template: render assistant tool_calls (ccc36750c842d7b1e0859ca1dd2d59dc339a0ef7) Co-authored-by: nathan ranchin <nathanrchn@users.noreply.huggingface.co>df58c17
-
Update README.md
Verified signature3d2b14b
-
Update LICENSE
Verified signature868df74
-
Fix Try LFM link to use playground.liquid.ai homepage
6314d2b -
Add Discord community link to README
97fd4c6
-
Update README.md
Verified signaturee7114d1
-
Update README.md
Verified signaturee129ea4
-
add GRPO TRL fine-tuning notebook
Verified signature719098d
-
Add GPQA evaluation result (#9)
Verified signature- Add GPQA evaluation result (29b5ff86b0a09af474084b9f915993f48d56c112) - Fix task_id to diamond (matching benchmark eval.yaml) (2bc02b7640f5428474e8eb8efb78d88673618a98) Co-authored-by: ben burtenshaw <burtenshaw@users.noreply.huggingface.co>8c1348a
-
Update README.md
Verified signature8dc4e68
-
Update README.md
Verified signature47c527b
-
Update README.md
Verified signaturec20ca41
-
Update README.md
Verified signature43f1e80
-
Update README.md
Verified signature286966c -
Upload README.md with huggingface_hub
Verified signature4393ab8
-
Update README.md
Verified signaturea4ba0a6
-
Add files using upload-large-folder tool
Verified signature205939a -
initial commit
Verified signaturef3a7622