3morixd commited on
Commit
d4bed3e
Β·
verified Β·
1 Parent(s): 05a9e0b

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +75 -38
README.md CHANGED
@@ -1,55 +1,92 @@
1
  ---
2
- license: apache-2.0
3
- base_model: MB20261/Llama32-3B-Instruct-function-calling-1M
 
 
4
  tags:
5
- - speculative-decoding-draft [dispatch-ai, mobile, quantized, gguf, phone-farm-tested]
 
 
 
 
 
 
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
- ## Speculative Decoding Draft Model
24
 
25
- This model is optimized for use as a **draft model** in speculative decoding setups.
 
26
 
27
- ### What is speculative decoding?
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
- ### Why this model?
33
- - **Small and fast**: Sub-1B parameters = minimal draft overhead
34
- - **Mobile-optimized**: Already quantized and pruned for edge deployment
35
- - **Same family**: Pairs naturally with larger models of the same architecture
 
 
 
 
 
 
36
 
37
- ### Usage with vLLM
38
  ```python
39
- from vllm import LLM, SamplingParams
 
 
 
 
 
 
 
 
40
 
41
- llm = LLM(
42
- model="target-model-7b",
43
- speculative_model="dispatchAI/Llama-3.2-1B-FunctionCall-mobile",
44
- num_speculative_tokens=5,
 
 
 
 
45
  )
46
  ```
47
 
48
- ### Usage with transformers
49
- ```python
50
- from transformers import AutoModelForCausalLM, AutoTokenizer
51
 
52
- target = AutoModelForCausalLM.from_pretrained("target-model-7b")
53
- draft = AutoModelForCausalLM.from_pretrained("dispatchAI/Llama-3.2-1B-FunctionCall-mobile")
54
- # See transformers docs for assisted_generation
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.