Instructions to use LiquidAI/LFM3-1.7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LiquidAI/LFM3-1.7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LiquidAI/LFM3-1.7B", trust_remote_code=True) 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/LFM3-1.7B", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("LiquidAI/LFM3-1.7B", trust_remote_code=True, 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/LFM3-1.7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LiquidAI/LFM3-1.7B" # 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/LFM3-1.7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LiquidAI/LFM3-1.7B
- SGLang
How to use LiquidAI/LFM3-1.7B 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/LFM3-1.7B" \ --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/LFM3-1.7B", "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/LFM3-1.7B" \ --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/LFM3-1.7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use LiquidAI/LFM3-1.7B with Docker Model Runner:
docker model run hf.co/LiquidAI/LFM3-1.7B
⚡LFM3-1.7B-DSpark: Up to 3.1× faster LFM3-1.7B inference with a DSpark draft model (vLLM + llama.cpp)
👍 1
7
#29 opened 3 days ago
by
rasyosef
Five 1.7B role specialists fine-tuned from LFM3-1.7B-Base
🔥 5
#28 opened 7 days ago
by
SkyIsNotGreen
Confuses C with C++ then code in python....
2
#24 opened 8 days ago
by
nenor
a dspark model would be wonderful, even if silly
❤️👀 3
2
#23 opened 8 days ago
by
Smorty100
LFM 3 24B A2B
🚀❤️ 11
3
#22 opened 8 days ago
by
Banaxi-Tech
Unexpected </think> with enable_thinking=False — expected behavior?
4
#20 opened 9 days ago
by
DTwingy
LFM3-1.7B on WebGPU straight from your GGUF, faster than the ONNX recipe — could you list it as a browser option?
1
#19 opened 9 days ago
by
KikoCis
ChatGPT distillation?
1
#17 opened 10 days ago
by
Parallax-LM
finetune guide, add more language
1
#16 opened 10 days ago
by
devops724
Please make a LFM 3 9B Omni!!!
❤️🔥 10
#15 opened 11 days ago
by
minas2025
Single-file CMF build for local inference (Rust; Vulkan, Metal, CPU)
❤️🚀 2
#14 opened 12 days ago
by
infosave
LFM3 in Apollo: When?
1
#12 opened 13 days ago
by
DedeProGames
LFM3 in Apollo: When?
👍 1
#11 opened 13 days ago
by
DedeProGames
Tri-hybrid architecture
1
#10 opened 13 days ago
by
sometimesanotion
Dspark or Dflash model?
1
#9 opened 14 days ago
by
Vortecks
Can't wait to try it out
❤️ 1
#8 opened 14 days ago
by
Cheuv
Great model! And some 7900XTX perf data
🤗 2
#7 opened 14 days ago
by
harryhaaren
iPhone peak memory and prefill at 128K and 256K context
👍 2
1
#5 opened 14 days ago
by
alphabell-research
vllm version for deploy?
6
#4 opened 15 days ago
by
adasjh
Got error when running and finetuning
2
#3 opened 15 days ago
by
mahdisml
Thanks & architecture question
🤗 4
1
#2 opened 15 days ago
by
nraxl1