Instructions to use dispatchAI/Llama-3.2-1B-FunctionCall-mobile with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use dispatchAI/Llama-3.2-1B-FunctionCall-mobile with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="dispatchAI/Llama-3.2-1B-FunctionCall-mobile", filename="model.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use dispatchAI/Llama-3.2-1B-FunctionCall-mobile with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf dispatchAI/Llama-3.2-1B-FunctionCall-mobile # Run inference directly in the terminal: llama cli -hf dispatchAI/Llama-3.2-1B-FunctionCall-mobile
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf dispatchAI/Llama-3.2-1B-FunctionCall-mobile # Run inference directly in the terminal: llama cli -hf dispatchAI/Llama-3.2-1B-FunctionCall-mobile
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf dispatchAI/Llama-3.2-1B-FunctionCall-mobile # Run inference directly in the terminal: ./llama-cli -hf dispatchAI/Llama-3.2-1B-FunctionCall-mobile
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf dispatchAI/Llama-3.2-1B-FunctionCall-mobile # Run inference directly in the terminal: ./build/bin/llama-cli -hf dispatchAI/Llama-3.2-1B-FunctionCall-mobile
Use Docker
docker model run hf.co/dispatchAI/Llama-3.2-1B-FunctionCall-mobile
- LM Studio
- Jan
- vLLM
How to use dispatchAI/Llama-3.2-1B-FunctionCall-mobile with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dispatchAI/Llama-3.2-1B-FunctionCall-mobile" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dispatchAI/Llama-3.2-1B-FunctionCall-mobile", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dispatchAI/Llama-3.2-1B-FunctionCall-mobile
- Ollama
How to use dispatchAI/Llama-3.2-1B-FunctionCall-mobile with Ollama:
ollama run hf.co/dispatchAI/Llama-3.2-1B-FunctionCall-mobile
- Unsloth Studio
How to use dispatchAI/Llama-3.2-1B-FunctionCall-mobile with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for dispatchAI/Llama-3.2-1B-FunctionCall-mobile to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for dispatchAI/Llama-3.2-1B-FunctionCall-mobile to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for dispatchAI/Llama-3.2-1B-FunctionCall-mobile to start chatting
- Atomic Chat new
- Docker Model Runner
How to use dispatchAI/Llama-3.2-1B-FunctionCall-mobile with Docker Model Runner:
docker model run hf.co/dispatchAI/Llama-3.2-1B-FunctionCall-mobile
- Lemonade
How to use dispatchAI/Llama-3.2-1B-FunctionCall-mobile with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull dispatchAI/Llama-3.2-1B-FunctionCall-mobile
Run and chat with the model
lemonade run user.Llama-3.2-1B-FunctionCall-mobile-{{QUANT_TAG}}List all available models
lemonade list
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,55 +1,92 @@
|
|
| 1 |
---
|
| 2 |
-
license:
|
| 3 |
-
|
|
|
|
|
|
|
| 4 |
tags:
|
| 5 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
pipeline_tag: text-generation
|
| 7 |
-
language: [en]
|
| 8 |
---
|
|
|
|
| 9 |
# Llama-3.2-1B-FunctionCall-mobile
|
| 10 |
-
**Dispatch AI** β Built for mobile. Tested on real phones.
|
| 11 |
-
## Category
|
| 12 |
-
Function Calling β Q5 quality
|
| 13 |
-
## Model
|
| 14 |
-
Re-engineered from [MB20261/Llama32-3B-Instruct-function-calling-1M](https://huggingface.co/MB20261/Llama32-3B-Instruct-function-calling-1M).
|
| 15 |
-
Size: 1926 MB. Q4_K_M GGUF for llama.cpp.
|
| 16 |
-
## Usage
|
| 17 |
-
```bash
|
| 18 |
-
./llama-cli -m model.gguf -p "Hello" -n 100 -t 4 -c 512
|
| 19 |
-
```
|
| 20 |
-
π [dispatchAI on HuggingFace](https://huggingface.co/dispatchAI)
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
-
##
|
| 24 |
|
| 25 |
-
|
|
|
|
| 26 |
|
| 27 |
-
##
|
| 28 |
-
Speculative decoding pairs a small, fast "draft" model with a larger "target" model.
|
| 29 |
-
The draft model proposes tokens that the target model verifies in parallel, achieving
|
| 30 |
-
2-3x speedup with zero quality loss.
|
| 31 |
|
| 32 |
-
|
| 33 |
-
-
|
| 34 |
-
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
-
### Usage with vLLM
|
| 38 |
```python
|
| 39 |
-
from
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
)
|
| 46 |
```
|
| 47 |
|
| 48 |
-
##
|
| 49 |
-
```python
|
| 50 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: llama3.2
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
library_name: transformers
|
| 6 |
tags:
|
| 7 |
+
- mobile
|
| 8 |
+
- on-device
|
| 9 |
+
- quantized
|
| 10 |
+
- gguf
|
| 11 |
+
- function-calling
|
| 12 |
+
- agent
|
| 13 |
+
- dispatchai
|
| 14 |
pipeline_tag: text-generation
|
|
|
|
| 15 |
---
|
| 16 |
+
|
| 17 |
# Llama-3.2-1B-FunctionCall-mobile
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
+
A 1B parameter Llama-3.2 model intended for function calling, optimized for mobile. 1926MB GGUF file that runs at 6.0 tokens/sec on CPU.
|
| 20 |
+
|
| 21 |
+
## β οΈ Partially Verified
|
| 22 |
+
|
| 23 |
+
This model has been tested with mixed results:
|
| 24 |
+
- **Chat format**: `chatml` (use `chat_format="chatml"` in llama-cpp-python)
|
| 25 |
+
- **Test date**: June 2026
|
| 26 |
+
|
| 27 |
+
### Chat Test Results
|
| 28 |
+
|
| 29 |
+
| Prompt | Response | Correct? |
|
| 30 |
+
|--------|----------|----------|
|
| 31 |
+
| "What is the capital of France?" | "The capital of France is Paris." | β
|
|
| 32 |
+
| "What is 2+2?" | "The answer is 4." | β
|
|
| 33 |
+
| "Write a greeting." | "How are you doing today?" | β
|
|
| 34 |
+
|
| 35 |
+
### Function Calling Test Results
|
| 36 |
+
|
| 37 |
+
| Prompt | Response | Correct? |
|
| 38 |
+
|--------|----------|----------|
|
| 39 |
+
| "Set an alarm for 7am" | Refused, said it can only send messages | β |
|
| 40 |
+
| "Call my mom" | Generated unrelated JSON | β |
|
| 41 |
+
| "What's the weather in Dubai?" | `<functioncall> get_weather("Dubai")` | β
|
|
| 42 |
|
| 43 |
+
### Honest Assessment
|
| 44 |
|
| 45 |
+
**Chat**: Works well β coherent, correct responses.
|
| 46 |
+
**Function calling**: Inconsistent β this appears to be a base Llama-3.2-1B model, not actually fine-tuned for function calling. It can parse some intents with a strong system prompt but is unreliable. For production function calling, consider using a properly fine-tuned model or few-shot prompting with examples.
|
| 47 |
|
| 48 |
+
## Model Details
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
+
| Attribute | Value |
|
| 51 |
+
|-----------|-------|
|
| 52 |
+
| **Base Model** | meta-llama/Llama-3.2-1B-Instruct |
|
| 53 |
+
| **Parameters** | 1B |
|
| 54 |
+
| **File Size** | 1926 MB |
|
| 55 |
+
| **Format** | GGUF |
|
| 56 |
+
| **Chat Format** | chatml |
|
| 57 |
+
| **License** | Llama 3.2 License |
|
| 58 |
+
|
| 59 |
+
## Usage
|
| 60 |
|
|
|
|
| 61 |
```python
|
| 62 |
+
from llama_cpp import Llama
|
| 63 |
+
|
| 64 |
+
llm = Llama(model_path="model.gguf", chat_format="chatml", n_ctx=512, n_threads=4)
|
| 65 |
+
|
| 66 |
+
# Chat (works well)
|
| 67 |
+
response = llm.create_chat_completion(
|
| 68 |
+
messages=[{"role": "user", "content": "What is the capital of France?"}],
|
| 69 |
+
max_tokens=50,
|
| 70 |
+
)
|
| 71 |
|
| 72 |
+
# Function calling (use with strong system prompt)
|
| 73 |
+
response = llm.create_chat_completion(
|
| 74 |
+
messages=[
|
| 75 |
+
{"role": "system", "content": "You are a function-calling assistant. Parse the user request into a JSON function call. Available: set_alarm(time), call_contact(name), get_weather(location). Respond with ONLY the JSON."},
|
| 76 |
+
{"role": "user", "content": "What's the weather in Dubai?"}
|
| 77 |
+
],
|
| 78 |
+
max_tokens=50,
|
| 79 |
+
temperature=0.1,
|
| 80 |
)
|
| 81 |
```
|
| 82 |
|
| 83 |
+
## Limitations
|
|
|
|
|
|
|
| 84 |
|
| 85 |
+
- Not actually fine-tuned for function calling β uses a base Llama-3.2-1B
|
| 86 |
+
- Function calling is inconsistent (~33% success rate in testing)
|
| 87 |
+
- 1926MB file is large for a 1B model (may be FP16 instead of quantized)
|
| 88 |
+
- For reliable function calling, use few-shot prompting or a dedicated FC model
|
| 89 |
+
|
| 90 |
+
## About dispatchAI
|
| 91 |
+
|
| 92 |
+
[dispatchAI](https://huggingface.co/dispatchAI) β Small. Mobile. Free. UAE-built.
|