初始化项目,由ModelHub XC社区提供模型

Model: RefinedNeuro/RefinedToolCallV5-3b
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-07-24 02:41:09 +08:00
commit fcd61a0edc
11 changed files with 306 additions and 0 deletions

39
.gitattributes vendored Normal file
View File

@@ -0,0 +1,39 @@
*.7z filter=lfs diff=lfs merge=lfs -text
*.arrow filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.ftz filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.joblib filter=lfs diff=lfs merge=lfs -text
*.lfs.* filter=lfs diff=lfs merge=lfs -text
*.mlmodel filter=lfs diff=lfs merge=lfs -text
*.model filter=lfs diff=lfs merge=lfs -text
*.msgpack filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.npz filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text
*.ot filter=lfs diff=lfs merge=lfs -text
*.parquet filter=lfs diff=lfs merge=lfs -text
*.pb filter=lfs diff=lfs merge=lfs -text
*.pickle filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.safetensors filter=lfs diff=lfs merge=lfs -text
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.tar.* filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tflite filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
RefinedToolCallV5-3b-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
RefinedToolCallV5-3b-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
RefinedToolCallV5-3b-f16.gguf filter=lfs diff=lfs merge=lfs -text
tokenizer.json filter=lfs diff=lfs merge=lfs -text

101
README.md Normal file
View File

@@ -0,0 +1,101 @@
---
license: apache-2.0
base_model: WeiboAI/VibeThinker-3B
datasets:
- lambda/hermes-agent-reasoning-traces
language:
- en
pipeline_tag: text-generation
tags:
- tool-calling
- function-calling
- multi-turn
- agentic
- hermes
- reasoning
- qwen2
---
# 🛠️🧠 RefinedToolCall-V5-3B
### A 3B model that *reasons* and *calls tools* — and actually holds a multi-turn conversation.
**Math-grade reasoning · real function calling · multi-turn agentic · 2.5 GB · runs on your laptop.**
> `ollama run refinedneuro/refinedtoolcallv5-3b`
---
## Why it's different
Most 3B tool-callers nail a single function call and then fall apart the moment the task spans
several turns. **RefinedToolCall-V5** was built specifically to fix that — and the numbers moved on
*every* axis at once, not just the one we were targeting.
- 🔁 **Multi-turn agentic that actually works** — **~3.7× better** at stateful, multi-step
tool-use (Berkeley Function-Calling Leaderboard `multi_turn`) than where we started.
- 🛠️ **Sharper single-turn calling** — **70.7%** on BFCL single-turn (held-out), our best ever.
- 💪 **Recovers from tool errors** — **0.896** recovery rate; it diagnoses failures instead of
looping on them.
- 🧮 **Reasoning fully intact** — **AIME-2024 pass@8 0.933**, unchanged by all the tool training.
- ⚡ **Tiny & local** — 3B params, **2.5 GB** Q6_K, one command on Ollama, no GPU required.
- 🆓 **Apache-2.0** — use it, ship it, fine-tune it.
---
## The receipts (all held-out, canary-gated)
| capability | this model |
|---|---|
| 🔁 Multi-turn agentic (BFCL `multi_turn`, k=3) | **0.220 avg / 0.298 pass@3** |
| 🛠️ Single-turn function calling (BFCL, held-out) | **0.707** |
| 🩹 Recovery from tool errors (n=250) | **0.896** |
| 🧮 Reasoning (AIME-2024 pass@8) | **0.933** |
Every number is the **best across five fine-tuning rounds** — multi-turn, single-turn, recovery,
*and* reasoning all peaked together.
---
## How we got here (and why it generalizes)
We didn't just throw data at it. Five disciplined rounds, each one gated so it could **never**
regress reasoning or recovery:
1. **Grounding** — stop inventing shell commands; call the actual functions.
2. **Plan + finish** — think before calling, and know when the turn is done.
3. **Scale + long context** — harder tasks, up to 24k tokens.
4. **On-policy self-improvement (the breakthrough)** — the model learns from its *own* successful
multi-turn solutions (expert iteration), which broke past the imitation ceiling **and** sharpened
single-turn calling and error-recovery as a bonus.
---
## Quick start
**Ollama**
```bash
ollama run refinedneuro/refinedtoolcallv5-3b # latest = Q6_K, 2.5 GB
```
> 💡 Use **Q6_K or higher** for tool-calling — lower quants corrupt the call tokens.
**Format:** ChatML + Hermes tools. Each turn the model emits a `<think>` plan → one or more
`<tool_call>` blocks → a final reply. Recommended: temp 0.6, top_p 0.95, repeat_penalty 1.1.
---
## Great for
✅ Local/offline agentic tool-use prototypes ✅ Multi-step function-calling assistants
✅ Math & STEM reasoning ✅ Learning how small agentic models are actually built.
## Be honest with me (research preview)
⚠️ It's a **3B research preview**. Multi-turn is **dramatically improved (~3.7×) but not solved** —
very long, open-ended autonomous loops can still write buggy code or mis-plan. A brilliant,
tiny building block; not yet a drop-in autonomous engineer.
---
*Built on [WeiboAI/VibeThinker-3B](https://huggingface.co/WeiboAI/VibeThinker-3B) +
[lambda/hermes-agent-reasoning-traces](https://huggingface.co/datasets/lambda/hermes-agent-reasoning-traces).
Trained with distribution-matched RFT + on-policy expert iteration, every checkpoint gated against
reasoning/recovery canaries. Apache-2.0.*

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eaae72d41879b68de730368248d61485b98ef0dac0170004aa88d7e6ddfc5236
size 2538158304

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b41c055f1faf32903a9df71e90ae26c1623f62dc2c80c84b0a55e336e607b685
size 3285476320

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:32b00f5b4404a76ba06d182eb1a22e2dcdf88de76af447bddca96d85a7ed74c8
size 6178317280

54
chat_template.jinja Normal file
View File

@@ -0,0 +1,54 @@
{%- if tools %}
{{- '<|im_start|>system\n' }}
{%- if messages[0]['role'] == 'system' %}
{{- messages[0]['content'] }}
{%- else %}
{{- 'You are a helpful assistant.' }}
{%- endif %}
{{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
{%- for tool in tools %}
{{- "\n" }}
{{- tool | tojson }}
{%- endfor %}
{{- "\n</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><|im_end|>\n" }}
{%- else %}
{%- if messages[0]['role'] == 'system' %}
{{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
{%- else %}
{{- '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}
{%- endif %}
{%- endif %}
{%- for message in messages %}
{%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
{%- elif message.role == "assistant" %}
{{- '<|im_start|>' + message.role }}
{%- if message.content %}
{{- '\n' + message.content }}
{%- endif %}
{%- for tool_call in message.tool_calls %}
{%- if tool_call.function is defined %}
{%- set tool_call = tool_call.function %}
{%- endif %}
{{- '\n<tool_call>\n{"name": "' }}
{{- tool_call.name }}
{{- '", "arguments": ' }}
{{- tool_call.arguments | tojson }}
{{- '}\n</tool_call>' }}
{%- endfor %}
{{- '<|im_end|>\n' }}
{%- elif message.role == "tool" %}
{%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
{{- '<|im_start|>user' }}
{%- endif %}
{{- '\n<tool_response>\n' }}
{{- message.content }}
{{- '\n</tool_response>' }}
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
{{- '<|im_end|>\n' }}
{%- endif %}
{%- endif %}
{%- endfor %}
{%- if add_generation_prompt %}
{{- '<|im_start|>assistant\n' }}
{%- endif %}

69
config.json Normal file
View File

@@ -0,0 +1,69 @@
{
"architectures": [
"Qwen2ForCausalLM"
],
"attention_dropout": 0.0,
"bos_token_id": 151643,
"dtype": "bfloat16",
"eos_token_id": 151643,
"hidden_act": "silu",
"hidden_size": 2048,
"initializer_range": 0.02,
"intermediate_size": 11008,
"layer_types": [
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention"
],
"max_position_embeddings": 131072,
"max_window_layers": 36,
"model_type": "qwen2",
"num_attention_heads": 16,
"num_hidden_layers": 36,
"num_key_value_heads": 2,
"pad_token_id": null,
"rms_norm_eps": 1e-06,
"rope_parameters": {
"rope_theta": 1000000.0,
"rope_type": "default"
},
"sliding_window": null,
"tie_word_embeddings": true,
"transformers_version": "5.7.0",
"use_cache": false,
"use_sliding_window": false,
"vocab_size": 151936
}

12
generation_config.json Normal file
View File

@@ -0,0 +1,12 @@
{
"bos_token_id": 151643,
"do_sample": true,
"eos_token_id": [
151645,
151643
],
"max_new_tokens": 65536,
"temperature": 0.6,
"top_p": 0.95,
"transformers_version": "5.7.0"
}

3
model.safetensors Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1e64a0fc8121c4aa9d2110318280ecad3916513c6a64f8035b8a64ba65911a52
size 6171927112

3
tokenizer.json Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b17e16899b7fab7e695509f84bac5f10ed12804f0a590e935941e5af7f092f7f
size 11422263

16
tokenizer_config.json Normal file
View File

@@ -0,0 +1,16 @@
{
"add_prefix_space": false,
"backend": "tokenizers",
"bos_token": null,
"clean_up_tokenization_spaces": false,
"eos_token": "<|endoftext|>",
"errors": "replace",
"is_local": true,
"local_files_only": false,
"model_max_length": 131072,
"pad_token": "<|endoftext|>",
"padding_side": "right",
"split_special_tokens": false,
"tokenizer_class": "Qwen2Tokenizer",
"unk_token": null
}