Update README.md
Browse files
README.md
CHANGED
|
@@ -6,4 +6,99 @@ language:
|
|
| 6 |
base_model:
|
| 7 |
- Qwen/Qwen3-4B
|
| 8 |
pipeline_tag: text-generation
|
| 9 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
base_model:
|
| 7 |
- Qwen/Qwen3-4B
|
| 8 |
pipeline_tag: text-generation
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+

|
| 12 |
+
|
| 13 |
+
### Model Details
|
| 14 |
+
- **Name**: CarrotAI/Rabbit3-Ko-4B
|
| 15 |
+
- **Version**: 4B Instruct
|
| 16 |
+
- **Base Model**: Qwen/Qwen3-4B
|
| 17 |
+
- **Languages**: Korean, English
|
| 18 |
+
- **Model Type**: Large Language Model (Instruction-tuned)
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
### Score
|
| 22 |
+
|
| 23 |
+
| Tasks |Version| Filter |n-shot| Metric | |Value | |Stderr|
|
| 24 |
+
|------------------|-------|----------------|-----:|-----------------------|---|-----:|---|------|
|
| 25 |
+
|gsm8k | 3|flexible-extract| 5|exact_match |↑ |0.8400|± |0.0101|
|
| 26 |
+
| | |strict-match | 5|exact_match |↑ |0.8378|± |0.0102|
|
| 27 |
+
|hrm8k | N/A| | | | | | | |
|
| 28 |
+
| - hrm8k_gsm8k | 1|none | 0|exact_match |↑ |0.8196|± |0.0106|
|
| 29 |
+
| - hrm8k_ksm | 1|none | 0|exact_match |↑ |0.0511|± |0.0058|
|
| 30 |
+
| - hrm8k_math | 1|none | 0|exact_match |↑ |0.5539|± |0.0093|
|
| 31 |
+
| - hrm8k_mmmlu | 1|none | 0|exact_match |↑ |0.5362|± |0.0230|
|
| 32 |
+
| - hrm8k_omni_math| 1|none | 0|exact_match |↑ |0.1812|± |0.0088|
|
| 33 |
+
|ifeval | 4|none | 0|inst_level_loose_acc |↑ |0.8753|± | N/A|
|
| 34 |
+
| | |none | 0|inst_level_strict_acc |↑ |0.8609|± | N/A|
|
| 35 |
+
| | |none | 0|prompt_level_loose_acc |↑ |0.8244|± |0.0164|
|
| 36 |
+
| | |none | 0|prompt_level_strict_acc|↑ |0.8078|± |0.0170|
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
|Groups|Version|Filter|n-shot| Metric | |Value | |Stderr|
|
| 40 |
+
|------|------:|------|------|--------|---|-----:|---|------|
|
| 41 |
+
|haerae| 1|none | |acc |↑ |0.6654|± |0.0140|
|
| 42 |
+
| | |none | |acc_norm|↑ |0.6654|± |0.0140|
|
| 43 |
+
|kobest| 1|none | |acc |↑ |0.7768|± |0.0057|
|
| 44 |
+
| | |none | |acc_norm|↑ |0.5880|± |0.0220|
|
| 45 |
+
| | |none | |f1 |↑ |0.7764|± | N/A|
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
| Groups |Version|Filter|n-shot| Metric | |Value | |Stderr|
|
| 49 |
+
|-------------------------------|------:|------|------|-----------|---|-----:|---|-----:|
|
| 50 |
+
|kmmlu_direct | 2|none | |exact_match|↑ |0.5212|± |0.0026|
|
| 51 |
+
| - kmmlu_direct_applied_science| 2|none | |exact_match|↑ |0.4997|± |0.0046|
|
| 52 |
+
| - kmmlu_direct_humss | 2|none | |exact_match|↑ |0.5365|± |0.0068|
|
| 53 |
+
| - kmmlu_direct_other | 2|none | |exact_match|↑ |0.5130|± |0.0053|
|
| 54 |
+
| - kmmlu_direct_stem | 2|none | |exact_match|↑ |0.5455|± |0.0048|
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
```python
|
| 58 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 59 |
+
|
| 60 |
+
model_name = "CarrotAI/Rabbit3-Ko-4B"
|
| 61 |
+
|
| 62 |
+
# load the tokenizer and the model
|
| 63 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 64 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 65 |
+
model_name,
|
| 66 |
+
torch_dtype="auto",
|
| 67 |
+
device_map="auto"
|
| 68 |
+
)
|
| 69 |
+
|
| 70 |
+
# prepare the model input
|
| 71 |
+
prompt = "Give me a short introduction to large language model."
|
| 72 |
+
messages = [
|
| 73 |
+
{"role": "user", "content": prompt}
|
| 74 |
+
]
|
| 75 |
+
text = tokenizer.apply_chat_template(
|
| 76 |
+
messages,
|
| 77 |
+
tokenize=False,
|
| 78 |
+
add_generation_prompt=True,
|
| 79 |
+
enable_thinking=True # Switches between thinking and non-thinking modes. Default is True.
|
| 80 |
+
)
|
| 81 |
+
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
| 82 |
+
|
| 83 |
+
# conduct text completion
|
| 84 |
+
generated_ids = model.generate(
|
| 85 |
+
**model_inputs,
|
| 86 |
+
max_new_tokens=32768
|
| 87 |
+
)
|
| 88 |
+
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
|
| 89 |
+
|
| 90 |
+
# parsing thinking content
|
| 91 |
+
try:
|
| 92 |
+
# rindex finding 151668 (</think>)
|
| 93 |
+
index = len(output_ids) - output_ids[::-1].index(151668)
|
| 94 |
+
except ValueError:
|
| 95 |
+
index = 0
|
| 96 |
+
|
| 97 |
+
thinking_content = tokenizer.decode(output_ids[:index], skip_special_tokens=True).strip("\n")
|
| 98 |
+
content = tokenizer.decode(output_ids[index:], skip_special_tokens=True).strip("\n")
|
| 99 |
+
|
| 100 |
+
print("thinking content:", thinking_content)
|
| 101 |
+
print("content:", content)
|
| 102 |
+
```
|
| 103 |
+
|
| 104 |
+
For deployment, you can use sglang>=0.4.6.post1 or vllm>=0.8.5 or to create an OpenAI-compatible API endpoint:
|