Instructions to use dispatchAI/Llama-3.2-1B-Instruct-mobile with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use dispatchAI/Llama-3.2-1B-Instruct-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-Instruct-mobile # Run inference directly in the terminal: llama cli -hf dispatchAI/Llama-3.2-1B-Instruct-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-Instruct-mobile # Run inference directly in the terminal: llama cli -hf dispatchAI/Llama-3.2-1B-Instruct-mobile
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf dispatchAI/Llama-3.2-1B-Instruct-mobile # Run inference directly in the terminal: ./build/bin/llama cli -hf dispatchAI/Llama-3.2-1B-Instruct-mobile
Use Docker
docker model run hf.co/dispatchAI/Llama-3.2-1B-Instruct-mobile
- Llama new
- LM Studio
- Jan
- vLLM
How to use dispatchAI/Llama-3.2-1B-Instruct-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-Instruct-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-Instruct-mobile", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dispatchAI/Llama-3.2-1B-Instruct-mobile
- Ollama
How to use dispatchAI/Llama-3.2-1B-Instruct-mobile with Ollama:
ollama run hf.co/dispatchAI/Llama-3.2-1B-Instruct-mobile
- Unsloth Desktop
- Docker Model Runner
How to use dispatchAI/Llama-3.2-1B-Instruct-mobile with Docker Model Runner:
docker model run hf.co/dispatchAI/Llama-3.2-1B-Instruct-mobile
- Lemonade
How to use dispatchAI/Llama-3.2-1B-Instruct-mobile with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull dispatchAI/Llama-3.2-1B-Instruct-mobile
Run and chat with the model
lemonade run user.Llama-3.2-1B-Instruct-mobile-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
Upload usage_examples.py with huggingface_hub
Browse files- usage_examples.py +29 -0
usage_examples.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Llama-3.2-1B-Instruct-mobile — Verified Usage Examples
|
| 2 |
+
# Chat format: llama-3
|
| 3 |
+
# CPU speed: 4.9 t/s
|
| 4 |
+
# Verified: June 2026
|
| 5 |
+
|
| 6 |
+
# === Using dispatchai SDK ===
|
| 7 |
+
from dispatchai import load_model
|
| 8 |
+
model = load_model("Llama-3.2-1B-Instruct-mobile", backend="gguf")
|
| 9 |
+
|
| 10 |
+
# Chat
|
| 11 |
+
response = model.chat("What is the capital of France?")
|
| 12 |
+
print(f"Capital: {response}")
|
| 13 |
+
|
| 14 |
+
# With system prompt
|
| 15 |
+
response = model.chat("Summarize this: The meeting is at 3pm.", system="You are a concise assistant.")
|
| 16 |
+
print(f"Summary: {response}")
|
| 17 |
+
|
| 18 |
+
# === Using llama-cpp-python directly ===
|
| 19 |
+
from llama_cpp import Llama
|
| 20 |
+
llm = Llama(model_path="model.gguf", chat_format="llama-3", n_ctx=512, n_threads=4, verbose=False)
|
| 21 |
+
|
| 22 |
+
response = llm.create_chat_completion(
|
| 23 |
+
messages=[{"role": "user", "content": "What is 2+2?"}],
|
| 24 |
+
max_tokens=30,
|
| 25 |
+
)
|
| 26 |
+
print(f"Math: {response['choices'][0]['message']['content']}")
|
| 27 |
+
|
| 28 |
+
# === Using llama.cpp CLI ===
|
| 29 |
+
# llama-cli -m model.gguf -p "Hello!" -n 30 -t 4 -st --chat-format llama-3
|