Text Generation
Transformers
Safetensors
English
Korean
lfm2
tool-calling
react-agent
sft
trl
toolbench
liquid-ai
lnn
conversational
Run this model with HF Jobs
Run gyung/LFM2-350M-ToolLLaMA on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/gyung/LFM2-350M-ToolLLaMA. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/gyung/LFM2-350M-ToolLLaMA on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/gyung/LFM2-350M-ToolLLaMA. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/gyung/LFM2-350M-ToolLLaMA. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use gyung/LFM2-350M-ToolLLaMA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gyung/LFM2-350M-ToolLLaMA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="gyung/LFM2-350M-ToolLLaMA") 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("gyung/LFM2-350M-ToolLLaMA") model = AutoModelForCausalLM.from_pretrained("gyung/LFM2-350M-ToolLLaMA", 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 gyung/LFM2-350M-ToolLLaMA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gyung/LFM2-350M-ToolLLaMA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gyung/LFM2-350M-ToolLLaMA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/gyung/LFM2-350M-ToolLLaMA
- SGLang
How to use gyung/LFM2-350M-ToolLLaMA 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 "gyung/LFM2-350M-ToolLLaMA" \ --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": "gyung/LFM2-350M-ToolLLaMA", "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 "gyung/LFM2-350M-ToolLLaMA" \ --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": "gyung/LFM2-350M-ToolLLaMA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use gyung/LFM2-350M-ToolLLaMA with Docker Model Runner:
docker model run hf.co/gyung/LFM2-350M-ToolLLaMA
Update README.md
Browse files123456789101112131415161718192021222324233 unmodified lines258259260261262263414 unmodified lines678679680681682683---base_model: LiquidAI/LFM2-350Mlibrary_name: transformersmodel_name: LFM2-350M-ToolLLaMAtags:- tool-calling- react-agent- sft- trl- toolbench- liquid-ai- lfm2- lnnlicense: otherdatasets:- gyung/toolbench-lfm-chatmllanguage:- en- kopipeline_tag: text-generation---# 🔧 LFM2-350M-ToolLLaMA233 unmodified lines| LFM2-350M-ToolLLaMA (2.5K step) | 354M | 100% | 100.0% | 54.1% || **LFM2-350M-ToolLLaMA (5.9K step, 최종)** | **354M** | **100%** | **99.9%** | **56.3%** || LFM2-1.2B-Tool (Liquid AI 공식) | 1.2B | 100% | 97.9% | 0.0% || ToolLLaMA-2-7b-v2 (논문 원본) | 6.7B | 100% | 99.7% | 75.3% |#### 핵심 인사이트414 unmodified lines| LFM2-350M-ToolLLaMA (2.5K step) | 354M | 100% | 100.0% | 54.1% || **LFM2-350M-ToolLLaMA (5.9K step, Final)** | **354M** | **100%** | **99.9%** | **56.3%** || LFM2-1.2B-Tool (Liquid AI Official) | 1.2B | 100% | 97.9% | 0.0% || ToolLLaMA-2-7b-v2 (Paper Original) | 6.7B | 100% | 99.7% | 75.3% |#### Key Insights123456789101112131415161718192021222324233 unmodified lines258259260261262263264414 unmodified lines679680681682683684685---base_model: LiquidAI/LFM2-350Mlibrary_name: transformersmodel_name: LFM2-350M-ToolLLaMAtags:- tool-calling- react-agent- sft- trl- toolbench- liquid-ai- lfm2- lnnlicense: otherdatasets:- gyung/toolbench-lfm-chatmllanguage:- en- kopipeline_tag: text-generation---# 🔧 LFM2-350M-ToolLLaMA233 unmodified lines| LFM2-350M-ToolLLaMA (2.5K step) | 354M | 100% | 100.0% | 54.1% || **LFM2-350M-ToolLLaMA (5.9K step, 최종)** | **354M** | **100%** | **99.9%** | **56.3%** || LFM2-1.2B-Tool (Liquid AI 공식) | 1.2B | 100% | 97.9% | 0.0% || GPT-5-Nano (OpenAI, 학습 없음) | — | 100%* | 78.6%* | 8.5%* || ToolLLaMA-2-7b-v2 (논문 원본) | 6.7B | 100% | 99.7% | 75.3% |#### 핵심 인사이트414 unmodified lines| LFM2-350M-ToolLLaMA (2.5K step) | 354M | 100% | 100.0% | 54.1% || **LFM2-350M-ToolLLaMA (5.9K step, Final)** | **354M** | **100%** | **99.9%** | **56.3%** || LFM2-1.2B-Tool (Liquid AI Official) | 1.2B | 100% | 97.9% | 0.0% || GPT-5-Nano (OpenAI, no ToolBench training) | — | 100%* | 78.6%* | 8.5%* || ToolLLaMA-2-7b-v2 (Paper Original) | 6.7B | 100% | 99.7% | 75.3% |#### Key Insights
README.md+23-21