Text Generation
Transformers
Safetensors
English
smollm3
function-calling
tool-use
sentovara
conversational
Eval Results (legacy)
Sentovara commited on
Commit
a2ea4b1
·
verified ·
1 Parent(s): a6438b1

Sentinel-3B v1 (SmolLM3-3B + Sentovara tool-calling, s3b5)

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,3 +1,144 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ base_model: HuggingFaceTB/SmolLM3-3B
4
+ base_model_relation: finetune
5
+ library_name: transformers
6
+ language:
7
+ - en
8
+ pipeline_tag: text-generation
9
+ tags:
10
+ - function-calling
11
+ - tool-use
12
+ - smollm3
13
+ - sentovara
14
+ datasets:
15
+ - Salesforce/xlam-function-calling-60k
16
+ - NousResearch/hermes-function-calling-v1
17
+ - glaiveai/glaive-function-calling-v2
18
+ model-index:
19
+ - name: Sentinel-3B
20
+ results:
21
+ - task:
22
+ type: text-generation
23
+ name: Function calling
24
+ dataset:
25
+ type: gorilla-llm/Berkeley-Function-Calling-Leaderboard
26
+ name: BFCL v4 (bfcl-eval 2026.3.23), non-live
27
+ metrics:
28
+ - type: accuracy
29
+ name: Non-live overall (repeat run)
30
+ value: 82.10
31
+ source:
32
+ name: Self-reported (Sentovara run of the official BFCL kit)
33
+ url: https://huggingface.co/Sentovara/Sentinel-3B
34
+ - task:
35
+ type: text-generation
36
+ name: Function calling
37
+ dataset:
38
+ type: gorilla-llm/Berkeley-Function-Calling-Leaderboard
39
+ name: BFCL v4 (bfcl-eval 2026.3.23), live
40
+ metrics:
41
+ - type: accuracy
42
+ name: Live overall
43
+ value: 62.84
44
+ source:
45
+ name: Self-reported (Sentovara run of the official BFCL kit)
46
+ url: https://huggingface.co/Sentovara/Sentinel-3B
47
+ - task:
48
+ type: text-generation
49
+ name: Function calling
50
+ dataset:
51
+ type: gorilla-llm/Berkeley-Function-Calling-Leaderboard
52
+ name: BFCL v4 (bfcl-eval 2026.3.23), multi-turn
53
+ metrics:
54
+ - type: accuracy
55
+ name: Multi-turn overall (repeat run)
56
+ value: 4.75
57
+ source:
58
+ name: Self-reported (Sentovara run of the official BFCL kit)
59
+ url: https://huggingface.co/Sentovara/Sentinel-3B
60
  ---
61
+
62
+ # Sentinel-3B
63
+
64
+ **Sentinel-3B is SmolLM3-3B (by Hugging Face) with Sentovara's tool-calling training merged into its weights.**
65
+ It is a 3-billion-parameter model for calling tools (functions). It is trained to call them correctly, and to *not* call one when none of the offered tools fits.
66
+
67
+ This card says plainly what it is and what it isn't.
68
+
69
+ ## What it is
70
+ - A full merged model. No add-on to load, no extra code. Use it like any SmolLM3 model.
71
+ - Built on [HuggingFaceTB/SmolLM3-3B](https://huggingface.co/HuggingFaceTB/SmolLM3-3B) (revision `a07cc9a0`), Apache 2.0.
72
+ - Trained with one LoRA add-on (r16), then merged. Training data: outside function-calling sets only (listed below). **No BFCL questions were used**, and every training question was checked against all BFCL v4 questions (see "Training data").
73
+
74
+ ## What it isn't
75
+ - Not a new model from scratch. Most of its ability comes from SmolLM3-3B.
76
+ - Not tested on BFCL's agentic section (web search / memory), which needs a paid search key. So BFCL's "Overall" score is **not quoted**: it would count that section as 0.
77
+ - Not on the official BFCL leaderboard yet. The scores below are our own runs of the official, unmodified BFCL kit. We are submitting it to the BFCL team so they can run it themselves.
78
+ - Not strong at long multi-turn tasks. No model in this group is (see the table).
79
+
80
+ ## Results: BFCL v4 (bfcl-eval 2026.3.23)
81
+ Same kit, same settings, same machine type for every model. "Knows not to call" = BFCL's irrelevance checks (the model is offered tools that don't fit and should not call one).
82
+
83
+ | Model | Non-live | Live | Multi-turn | Knows not to call (non-live) | Knows not to call (live) |
84
+ |---|---|---|---|---|---|
85
+ | **Sentinel-3B (run 1)** | 82.48% | 62.84% | 5.12% | 78.75% (189/240) | 69.34% (613/884) |
86
+ | **Sentinel-3B (repeat run)** | 82.10% | 62.84% | 4.75% | 78.75% (189/240) | 69.34% (613/884) |
87
+ | Llama-3.2-3B-Instruct (FC) | 82.17% | 58.40% | 4.25% | 62.50% (150/240) | 41.86% (370/884) |
88
+ | Phi-4-mini-instruct (FC) | 73.65% | 55.51% | 0.00% | 78.75% (189/240) | 82.47% (729/884) |
89
+ | SmolLM3-3B (base, no training) | 79.96% | 64.77% | 1.88% | 63.75% (153/240) | 63.69% (563/884) |
90
+
91
+ In plain terms:
92
+ - **Against Llama-3.2-3B:** level on non-live, ahead on live (+4.4) and multi-turn, and much better at knowing when not to call (189 vs 150; 69% vs 42%).
93
+ - **Against Phi-4-mini:** ahead on calling (non-live +8.5, live +7.3, multi-turn), level on "knows not to call" non-live. **Phi is better at "knows not to call" on live questions (82% vs 69%).**
94
+ - **Against its own base (SmolLM3-3B):** higher on non-live (+2.1 to +2.5) and multi-turn, much better at knowing when not to call (+36 questions non-live, +50 live), **slightly lower on live (-1.9).**
95
+
96
+ ## How it was chosen (every attempt, with the rule set beforehand)
97
+ Before training we fixed a pass rule: non-live above 81.02%, live at or above 61.07%, and "knows not to call" at least 187/240 (non-live) and 63.46% (live) — the scores of our earlier add-on, so the new model could not get worse at holding back. We did not change the rule after seeing any result. Every attempt:
98
+
99
+ | Attempt | Non-live | Live | Multi-turn | Knows not to call (non-live / live) | Outcome |
100
+ |---|---|---|---|---|---|
101
+ | 1 (8% "don't call" examples) | 84.23% | 64.99% | 6.62% | 25/240 · 23.87% | Rejected: called a tool almost every time |
102
+ | 2 (one third "don't call") | 83.54% | 62.40% | 6.12% | 186/240 · 71.49% | Rejected: one question below the bar |
103
+ | 3 (40% "don't call") | 84.06% | 65.73% | 5.38% | 185/240 · 72.85% | Rejected: two questions below the bar |
104
+ | **4 (one unrelated tool per "don't call" example)** | **82.48%** | **62.84%** | **5.12%** | **189/240 · 69.34%** | **Passed, repeat run passed — published** |
105
+
106
+ Attempt 1 is a useful lesson: training only on "call the tool" examples raised the headline scores but wore away the model's ability to hold back. We did not publish the higher-scoring attempts because they failed that check.
107
+
108
+ ## Training data
109
+ - **Salesforce xLAM function-calling 60k** (CC-BY-4.0): calls of one or several tools at once; also used to build "don't call" examples (an xLAM question paired with one unrelated xLAM tool, answer declines).
110
+ - **NousResearch Hermes function-calling** and **Glaive function-calling** (Apache 2.0), via our earlier tool add-on: tool calls, polite refusals, and asking for missing details.
111
+ - 5,000 rows, one third without a tool call. "Let me find that" replies with no call were removed.
112
+ - **Decontamination:** every training question was checked against all 7,053 BFCL v4 user questions (every category). Rows equal to a BFCL question, or sharing any run of 13 words with one, were removed (165 removed from xLAM).
113
+
114
+ ## Evaluation setup
115
+ - Official `bfcl-eval` 2026.3.23, unmodified scoring, vLLM 0.31 serving.
116
+ - Sentinel-3B and SmolLM3 use a SmolLM3 handler we wrote (SmolLM3's own chat template with tools, `/no_think`); Llama and Phi use BFCL's own handlers.
117
+ - Serving fixes for the comparison models (written up in our project record): Phi-4-mini needed a longer context limit and its short-context rope factors (matching Hugging Face's reference code) — its non-live score of 73.65% matches published third-party figures; Llama needed a stale package removed from the cloud image. BFCL code and scoring were not changed.
118
+ - Agentic section not run for any model.
119
+
120
+ ## How to use
121
+ ```python
122
+ from transformers import AutoModelForCausalLM, AutoTokenizer
123
+ tok = AutoTokenizer.from_pretrained("Sentovara/Sentinel-3B")
124
+ model = AutoModelForCausalLM.from_pretrained("Sentovara/Sentinel-3B", torch_dtype="auto", device_map="auto")
125
+ tools = [{"type": "function", "function": {"name": "get_weather", "description": "Current weather for a city",
126
+ "parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}}]
127
+ messages = [{"role": "system", "content": "/no_think"}, {"role": "user", "content": "What's the weather in Paris and Rome?"}]
128
+ text = tok.apply_chat_template(messages, tools=tools, add_generation_prompt=True, tokenize=False)
129
+ ids = tok(text, return_tensors="pt", add_special_tokens=False)["input_ids"].to(model.device)
130
+ out = model.generate(ids, max_new_tokens=200, do_sample=False)
131
+ print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))
132
+ ```
133
+ Tool calls come back as `<tool_call>{"name": ..., "arguments": {...}}</tool_call>`, one per call.
134
+
135
+ ## Limitations
136
+ - Multi-turn tool use is weak (about 5%), like every model in this size group we tested.
137
+ - Java and JavaScript-typed questions were not specifically trained.
138
+ - English only in training. 3B parameters: it will make mistakes; check tool calls before running anything that matters.
139
+
140
+ ## Credits and licences
141
+ - Base model: SmolLM3-3B by Hugging Face (Apache 2.0).
142
+ - Data: Salesforce xLAM function-calling 60k (CC-BY-4.0) — Liu et al., *APIGen: Automated Pipeline for Generating Verifiable and Diverse Function-Calling Datasets* (2024); NousResearch Hermes function-calling (Apache 2.0); Glaive function-calling (Apache 2.0).
143
+ - Benchmark: Berkeley Function-Calling Leaderboard (BFCL), Patil et al., ICML 2025.
144
+ - Sentinel-3B is released under Apache 2.0 by Sentovara Ltd.
chat_template.jinja ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {# ───── defaults ───── #}
2
+ {%- if enable_thinking is not defined -%}
3
+ {%- set enable_thinking = true -%}
4
+ {%- endif -%}
5
+
6
+ {# ───── reasoning mode ───── #}
7
+ {%- if enable_thinking -%}
8
+ {%- set reasoning_mode = "/think" -%}
9
+ {%- else -%}
10
+ {%- set reasoning_mode = "/no_think" -%}
11
+ {%- endif -%}
12
+
13
+ {# ───── header (system message) ───── #}
14
+ {{- "<|im_start|>system\n" -}}
15
+
16
+ {%- if messages[0].role == "system" -%}
17
+ {%- set system_message = messages[0].content -%}
18
+ {%- if "/no_think" in system_message -%}
19
+ {%- set reasoning_mode = "/no_think" -%}
20
+ {%- elif "/think" in system_message -%}
21
+ {%- set reasoning_mode = "/think" -%}
22
+ {%- endif -%}
23
+ {%- set custom_instructions = system_message.replace("/no_think", "").replace("/think", "").rstrip() -%}
24
+ {%- endif -%}
25
+
26
+ {%- if "/system_override" in system_message -%}
27
+ {{- custom_instructions.replace("/system_override", "").rstrip() -}}
28
+ {{- "<|im_end|>\n" -}}
29
+ {%- else -%}
30
+ {{- "## Metadata\n\n" -}}
31
+ {{- "Knowledge Cutoff Date: June 2025\n" -}}
32
+ {%- set today = strftime_now("%d %B %Y") -%}
33
+ {{- "Today Date: " ~ today ~ "\n" -}}
34
+ {{- "Reasoning Mode: " + reasoning_mode + "\n\n" -}}
35
+
36
+ {{- "## Custom Instructions\n\n" -}}
37
+ {%- if custom_instructions -%}
38
+ {{- custom_instructions + "\n\n" -}}
39
+ {%- elif reasoning_mode == "/think" -%}
40
+ {{- "You are a helpful AI assistant named SmolLM, trained by Hugging Face. Your role as an assistant involves thoroughly exploring questions through a systematic thinking process before providing the final precise and accurate solutions. This requires engaging in a comprehensive cycle of analysis, summarizing, exploration, reassessment, reflection, backtracking, and iteration to develop well-considered thinking process. Please structure your response into two main sections: Thought and Solution using the specified format: <think> Thought section </think> Solution section. In the Thought section, detail your reasoning process in steps. Each step should include detailed considerations such as analysing questions, summarizing relevant findings, brainstorming new ideas, verifying the accuracy of the current steps, refining any errors, and revisiting previous steps. In the Solution section, based on various attempts, explorations, and reflections from the Thought section, systematically present the final solution that you deem correct. The Solution section should be logical, accurate, and concise and detail necessary steps needed to reach the conclusion.\n\n" -}}
41
+ {%- else -%}
42
+ {{- "You are a helpful AI assistant named SmolLM, trained by Hugging Face.\n\n" -}}
43
+ {%- endif -%}
44
+
45
+ {%- if xml_tools or python_tools or tools -%}
46
+ {{- "### Tools\n\n" -}}
47
+ {%- if xml_tools or tools -%}
48
+ {%- if tools -%}
49
+ {%- set xml_tools = tools -%}
50
+ {%- endif -%}
51
+ {%- set ns = namespace(xml_tool_string="You may call one or more functions to assist with the user query.\nYou are provided with function signatures within <tools></tools> XML tags:\n\n<tools>\n") -%}
52
+ {%- for tool in xml_tools[:] -%} {# The slicing makes sure that xml_tools is a list #}
53
+ {%- set ns.xml_tool_string = ns.xml_tool_string ~ (tool | string) ~ "\n" -%}
54
+ {%- endfor -%}
55
+ {%- set xml_tool_string = ns.xml_tool_string + "</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call>" -%}
56
+ {{- xml_tool_string -}}
57
+ {%- endif -%}
58
+ {%- if python_tools -%}
59
+ {%- set ns = namespace(python_tool_string="When you send a message containing Python code between '<code>' and '</code>' tags, it will be executed in a stateful Jupyter notebook environment, and you will then be given the output to continued reasoning in an agentic loop.\n\nYou can use the following tools in your python code like regular functions:\n<tools>\n") -%}
60
+ {%- for tool in python_tools[:] -%} {# The slicing makes sure that python_tools is a list #}
61
+ {%- set ns.python_tool_string = ns.python_tool_string ~ (tool | string) ~ "\n" -%}
62
+ {%- endfor -%}
63
+ {%- set python_tool_string = ns.python_tool_string + "</tools>\n\nThe state persists between code executions: so variables that you define in one step are still available thereafter." -%}
64
+ {{- python_tool_string -}}
65
+ {%- endif -%}
66
+ {{- "\n\n" -}}
67
+ {{- "<|im_end|>\n" -}}
68
+ {%- endif -%}
69
+ {%- endif -%}
70
+ {# ───── main loop ───── #}
71
+ {%- for message in messages -%}
72
+ {%- set content = message.content if message.content is string else "" -%}
73
+ {%- if message.role == "user" -%}
74
+ {{ "<|im_start|>" + message.role + "\n" + content + "<|im_end|>\n" }}
75
+ {%- elif message.role == "assistant" -%}
76
+ {% generation %}
77
+ {%- if reasoning_mode == "/think" -%}
78
+ {{ "<|im_start|>assistant\n" + content.lstrip("\n") + "<|im_end|>\n" }}
79
+ {%- else -%}
80
+ {{ "<|im_start|>assistant\n" + "<think>\n\n</think>\n" + content.lstrip("\n") + "<|im_end|>\n" }}
81
+ {%- endif -%}
82
+ {% endgeneration %}
83
+ {%- elif message.role == "tool" -%}
84
+ {{ "<|im_start|>" + "user\n" + content + "<|im_end|>\n" }}
85
+ {%- endif -%}
86
+ {%- endfor -%}
87
+ {# ───── generation prompt ───── #}
88
+ {%- if add_generation_prompt -%}
89
+ {%- if reasoning_mode == "/think" -%}
90
+ {{ "<|im_start|>assistant\n" }}
91
+ {%- else -%}
92
+ {{ "<|im_start|>assistant\n" + "<think>\n\n</think>\n" }}
93
+ {%- endif -%}
94
+ {%- endif -%}
config.json ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "SmolLM3ForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 128000,
8
+ "dtype": "bfloat16",
9
+ "eos_token_id": 128012,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 2048,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 11008,
14
+ "layer_types": [
15
+ "full_attention",
16
+ "full_attention",
17
+ "full_attention",
18
+ "full_attention",
19
+ "full_attention",
20
+ "full_attention",
21
+ "full_attention",
22
+ "full_attention",
23
+ "full_attention",
24
+ "full_attention",
25
+ "full_attention",
26
+ "full_attention",
27
+ "full_attention",
28
+ "full_attention",
29
+ "full_attention",
30
+ "full_attention",
31
+ "full_attention",
32
+ "full_attention",
33
+ "full_attention",
34
+ "full_attention",
35
+ "full_attention",
36
+ "full_attention",
37
+ "full_attention",
38
+ "full_attention",
39
+ "full_attention",
40
+ "full_attention",
41
+ "full_attention",
42
+ "full_attention",
43
+ "full_attention",
44
+ "full_attention",
45
+ "full_attention",
46
+ "full_attention",
47
+ "full_attention",
48
+ "full_attention",
49
+ "full_attention",
50
+ "full_attention"
51
+ ],
52
+ "max_position_embeddings": 65536,
53
+ "max_window_layers": 28,
54
+ "mlp_bias": false,
55
+ "model_type": "smollm3",
56
+ "no_rope_layer_interval": 4,
57
+ "no_rope_layers": [
58
+ 1,
59
+ 1,
60
+ 1,
61
+ 0,
62
+ 1,
63
+ 1,
64
+ 1,
65
+ 0,
66
+ 1,
67
+ 1,
68
+ 1,
69
+ 0,
70
+ 1,
71
+ 1,
72
+ 1,
73
+ 0,
74
+ 1,
75
+ 1,
76
+ 1,
77
+ 0,
78
+ 1,
79
+ 1,
80
+ 1,
81
+ 0,
82
+ 1,
83
+ 1,
84
+ 1,
85
+ 0,
86
+ 1,
87
+ 1,
88
+ 1,
89
+ 0,
90
+ 1,
91
+ 1,
92
+ 1,
93
+ 0
94
+ ],
95
+ "num_attention_heads": 16,
96
+ "num_hidden_layers": 36,
97
+ "num_key_value_heads": 4,
98
+ "pad_token_id": 128004,
99
+ "pretraining_tp": 1,
100
+ "rms_norm_eps": 1e-06,
101
+ "rope_parameters": {
102
+ "rope_theta": 5000000.0,
103
+ "rope_type": "default"
104
+ },
105
+ "sliding_window": null,
106
+ "tie_word_embeddings": true,
107
+ "transformers_version": "5.24.1",
108
+ "use_cache": false,
109
+ "use_sliding_window": false,
110
+ "vocab_size": 128256
111
+ }
generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 128000,
3
+ "do_sample": true,
4
+ "eos_token_id": 128012,
5
+ "pad_token_id": 128004,
6
+ "temperature": 0.6,
7
+ "top_p": 0.95,
8
+ "transformers_version": "5.24.1"
9
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1de04bcc18792ebfe1c265d65acb55fd7ad48aee2fe28588e267b576cb4dbff1
3
+ size 6150235096
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b6a500b662a34eb3f0374db856ba4ad7de4c81040571d78dc0d357238930005
3
+ size 17208819
tokenizer_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "bos_token": null,
4
+ "clean_up_tokenization_spaces": true,
5
+ "eos_token": "<|im_end|>",
6
+ "fast": false,
7
+ "is_local": true,
8
+ "local_files_only": false,
9
+ "model_input_names": [
10
+ "input_ids",
11
+ "attention_mask"
12
+ ],
13
+ "model_max_length": 131072,
14
+ "pad_token": "<|im_end|>",
15
+ "tokenizer_class": "TokenizersBackend"
16
+ }