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
16 days ago
-
Add a "Runs on Mac" badge
Verified signatureHi, I make Outmake, a free Mac app for running open models locally. This adds one badge under the title. It shows the least memory a Mac needs to run LFM2.5-1.2B-Instruct well at 4 bits or more (8 GB and up) and links to a page with the size to get, the memory it uses and the estimated speed on every Apple silicon Mac. The badge is an SVG that updates every morning from the same numbers. Happy to change the placement, or close this if it isn't a fit.e5c9e0d
18 days ago
-
Add IFBench evaluation result (#24)
- Add IFBench evaluation result (ed644248bab25b87ef8b45a7617ae4b9145c95b2) Co-authored-by: Nathan Habib <SaylorTwift@users.noreply.huggingface.co>b9d816a -
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