Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

LiquidAI
/
LFM3-1.7B

Text Generation
Transformers
Safetensors
lfm3
liquid
edge
conversational
custom_code
Eval Results
Model card Files Files and versions
xet
Community
11

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 AutoModelForCausalLM
    model = AutoModelForCausalLM.from_pretrained("LiquidAI/LFM3-1.7B", trust_remote_code=True, device_map="auto")
  • 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
New discussion
Resources
  • PR & discussions documentation
  • Code of Conduct
  • Hub documentation

LFM3 in Apollo: When?

#12 opened about 1 hour ago by
DedeProGames

LFM3 in Apollo: When?

#11 opened about 1 hour ago by
DedeProGames

Tri-hybrid architecture

1
#10 opened about 8 hours ago by
sometimesanotion

Dspark or Dflash model?

1
#9 opened about 15 hours ago by
Vortecks

Can't wait to try it out

❤️ 1
#8 opened about 16 hours ago by
Cheuv

Great model! And some 7900XTX perf data

🤗 2
#7 opened 1 day ago by
harryhaaren

iPhone peak memory and prefill at 128K and 256K context

👍 2
1
#5 opened 1 day ago by
alphabell-research

vllm version for deploy?

3
#4 opened 2 days ago by
adasjh

Got error when running and finetuning

2
#3 opened 2 days ago by
mahdisml

Thanks & architecture question

🤗 1
1
#2 opened 2 days ago by
nraxl1
Company
TOS Privacy About Careers
Website
Models Datasets Spaces Pricing Docs