Views
No views yet
pip install dispatchai — Run mobile-optimized LLMs on your phone, edge device, or laptop. 31 verified models, all tested on real Snapdragon hardware, all free.pip install dispatchai[gguf]1from dispatchai import load_model
2
3model = load_model("SmolLM2-135M-Instruct-mobile", backend="gguf")
4response = model.chat("What is the capital of France?")
5print(response)
6# → "The capital of France is Paris."1import openai
2
3client = openai.OpenAI(
4 base_url="https://api.dispatchai.ai/v1",
5 api_key="da-demo-key-0001"
6)
7
8response = client.chat.completions.create(
9 model="dispatchAI/SmolLM2-135M-Instruct-mobile",
10 messages=[{"role": "user", "content": "What is the capital of France?"}]
11)
12print(response.choices[0].message.content)
13# → "The capital of France is Paris."https://api.dispatchai.ai/v11from dispatchai import recommend
2
3rec = recommend(ram_mb=2048, task="chat")
4print(f"Best model: {rec['recommended']['name']}")1from dispatchai import list_models
2
3for m in list_models(task="chat"):
4 print(f" {m['name']}: {m['size_mb']}MB, {m['speed_tps']} t/s")1from dispatchai import estimate_latency
2
3lat = estimate_latency("1B", "Q4_K_M")
4print(f"{lat['tokens_per_sec']} t/s on Snapdragon 865")1from dispatchai import calculate_cost
2
3result = calculate_cost(daily_queries=10000, cloud_cost_per_1k=0.50)
4print(f"Annual savings: ${result['savings']}")1pip install dispatchai # Core (model catalog, recommendations)
2pip install dispatchai[torch] # + transformers/torch backend
3pip install dispatchai[gguf] # + llama.cpp GGUF backend
4pip install dispatchai[full] # + everything| Model | Size | Phone Speed | Use Case |
|---|---|---|---|
| SmolLM2-135M | 101MB | 46.0 t/s | Ultra-fast, budget phones |
| Qwen2.5-0.5B-int4 | 469MB | 23.2 t/s | Best balance for mobile |
| Llama-3.2-1B-Q4 | 770MB | 5.4 t/s | Best quality under 1GB |