File size: 4,298 Bytes
01640a4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c49c82d
01640a4
 
 
 
 
 
 
aecb9ff
01640a4
 
 
 
 
 
 
 
 
 
 
 
476d887
 
 
 
01640a4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
476d887
01640a4
 
 
 
 
 
 
 
 
476d887
 
 
 
 
 
 
 
 
 
 
 
01640a4
 
c49c82d
01640a4
b777d55
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
license: apache-2.0
language:
- en
- zh
pipeline_tag: text-generation
base_model: Qwen/Qwen3-0.6B
tags:
- chat
- function-calling
- tool-use
- star-method
- sota
library_name: transformers
---

# STAR-0b6

## Introduction

**STAR-0b6** is a highly capable 0.6B parameter language model specialized in function calling, achieving excellent performances on the [Berkeley Function Calling Leaderboard (BFCL)](https://huggingface.co/spaces/gorilla-llm/berkeley-function-calling-leaderboard) for models in its size class.

This model is the result of fine-tuning the `Qwen/Qwen3-0.6B` base model using the novel **STAR (Similarity-guided Teacher-Assisted Refinement)** framework. STAR is a holistic training curriculum designed to effectively transfer the advanced capabilities of large language models (LLMs) into "super-tiny" models, making them powerful, accessible, and efficient for real-world agentic applications.

The key innovations of the STAR framework include:
- **Similarity-guided RL (Sim-RL)**: A reinforcement learning mechanism that uses a fine-grained, similarity-based reward signal. This provides a more robust and continuous signal for policy optimization compared to simple binary rewards, which is crucial for complex, multi-solution tasks like function calling.
- **Constrained Knowledge Distillation (CKD)**: An advanced training objective that augments top-k forward KL divergence to suppress confidently incorrect predictions. This ensures training stability while preserving the model's exploration capacity, creating a strong foundation for the subsequent RL phase.

Our STAR-0b6 model significantly outperforms other open models under 1B parameters and even surpasses several larger models, demonstrating the effectiveness of the STAR methodology.

## Model Details

- **Model Type**: Causal Language Model, fine-tuned for function calling.
- **Base Model**: `Qwen/Qwen3-0.6B`
- **Training Framework**: STAR (CKD + Sim-RL)
- **Architecture**: Transformer with RoPE, SwiGLU, RMSNorm, and Attention QKV bias.
- **Number of Parameters**: ~0.6B
- **Context Length**: Supports up to 32,768 tokens.

## Requirements

The code of Qwen3 has been in the latest Hugging Face `transformers` and we advise you to use the latest version of `transformers`.
With `transformers<4.51.0`, you will encounter the following error:
```
KeyError: 'qwen3'
```

## Quickstart

Here is a code snippet showing how to load STAR-0b6 and use it for a chat-based task.

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "star-lab/STAR-0b6"

model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)

# Example prompt that could trigger a function call
prompt = "What is the current weather in San Francisco?"
messages = [
    {"role": "system", "content": "You are a helpful assistant with access to external tools."},
    {"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)

generated_ids = model.generate(
    **model_inputs,
    max_new_tokens=32768
)
generated_ids = [
    output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]

response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)
```

For deployment, you can use `sglang>=0.4.6.post1` or `vllm>=0.8.5` or to create an OpenAI-compatible API endpoint:
- SGLang:
    ```shell
    python -m sglang.launch_server --model-path star-lab/STAR-0b6 --reasoning-parser qwen3
    ```
- vLLM:
    ```shell
    vllm serve star-lab/STAR-0b6 --enable-reasoning --reasoning-parser deepseek_r1
    ```

For local use, applications such as Ollama, LMStudio, MLX-LM, llama.cpp, and KTransformers have also supported STAR-0b6.

## Evaluation & Performance

STAR-0b6 has achieved outstanding performance for models of its size on renowned function calling benchmarks.

- BFCLv3: Achieved 51.70% overall accuracy.
- ACEBench: Achieved 53.00% summary score, demonstrating superior generalization and robustness. This score is significantly higher than its base model (27.20%).