artindnr commited on
Commit
68eb7e8
·
verified ·
1 Parent(s): a267517

Create REAME.md

Browse files
Files changed (1) hide show
  1. REAME.md +139 -0
REAME.md ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: artindnr/strawberry-1
4
+ tags:
5
+ - mixture-of-experts
6
+ - mxfp4
7
+ - text-generation
8
+ - chat
9
+ - pytorch
10
+ - jax
11
+ - tf
12
+ language:
13
+ - fa
14
+ - en
15
+ - multilingual
16
+ pipeline_tag: text-generation
17
+ ---
18
+
19
+ # 🍰 ChatBerry
20
+
21
+ ![https://i.pinimg.com/736x/bd/b9/be/bdb9bef25d336c9887e351cd1d7bfd57.jpg](https://i.pinimg.com/736x/bd/b9/be/bdb9bef25d336c9887e351cd1d7bfd57.jpg)
22
+
23
+ **ChatBerry** is a fine-tuned version of [`artindnr/strawberry-1`](https://huggingface.co/artindnr/strawberry-1), converted from a reasoning ("thinking") model into a **direct-answer chat model**. Reasoning traces are disabled — ChatBerry-1 responds directly, without emitting a separate chain-of-thought / analysis channel, making it faster and simpler to deploy for everyday conversational use in Farsi, English, and other languages.
24
+
25
+ ## Model Details
26
+
27
+ - **Base model:** [artindnr/strawberry-1](https://huggingface.co/artindnr/strawberry-1) (itself fine-tuned from [openai/gpt-oss-20b](https://huggingface.co/openai/gpt-oss-20b), 21B parameters)
28
+ - **Architecture:** `gpt_oss`
29
+ - **Fine-tuned by:** [artindnr](https://huggingface.co/artindnr)
30
+ - **License:** Apache 2.0
31
+ - **Languages:** Farsi (Persian), English, and multilingual support
32
+ - **Model type:** Causal decoder-only chat language model (reasoning disabled)
33
+
34
+ ## What's New
35
+
36
+ Strawberry-1 was built to generate high-quality Farsi reasoning traces. ChatBerry-1 takes the opposite approach: it strips reasoning out of the loop entirely, so the model:
37
+
38
+ - Answers directly, without producing an `analysis` (chain-of-thought) channel
39
+ - Behaves like a standard instruction-tuned chat model rather than a "thinking" model
40
+ - Retains Strawberry-1's Farsi and multilingual fluency, now applied to direct conversational responses
41
+ - Is better suited for latency-sensitive or simpler chat use cases where reasoning traces aren't needed
42
+
43
+ ## How to Use
44
+
45
+ ChatBerry uses the `gpt-oss` chat template (Harmony format) shipped with the base model, so it works with 🤗 Transformers.
46
+
47
+ ### Installation
48
+
49
+ ```bash
50
+ pip install torch --index-url https://download.pytorch.org/whl/cu128
51
+ pip install "trl>=0.20.0" "peft>=0.17.0" "transformers>=4.55.0" "kernels>=0.12.0"
52
+ ```
53
+
54
+ This has been verified to work with:
55
+
56
+ | Package | Version |
57
+ |---|---|
58
+ | `torch` | 2.8.0+cu129 |
59
+ | `transformers` | 5.14.1 |
60
+ | `trl` | 1.9.2 |
61
+ | `peft` | 0.20.0 |
62
+ | `accelerate` | 1.10.1 |
63
+ | `tokenizers` | 0.22.0 |
64
+
65
+ ### Generation
66
+
67
+ ```python
68
+ import torch
69
+ from transformers import AutoModelForCausalLM, AutoTokenizer
70
+
71
+ MODEL_ID = "artindnr/chatberry"
72
+
73
+ tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
74
+ model = AutoModelForCausalLM.from_pretrained(
75
+ MODEL_ID,
76
+ torch_dtype=torch.bfloat16,
77
+ device_map="auto",
78
+ )
79
+
80
+ USER_PROMPT = "تو کی هستی و اسمت چیه؟"
81
+
82
+ messages = [
83
+ {"role": "user", "content": USER_PROMPT},
84
+ ]
85
+
86
+ inputs = tokenizer.apply_chat_template(
87
+ messages,
88
+ add_generation_prompt=True,
89
+ tokenize=True,
90
+ return_dict=True,
91
+ return_tensors="pt",
92
+ ).to(model.device)
93
+
94
+ outputs = model.generate(
95
+ **inputs,
96
+ max_new_tokens=512,
97
+ temperature=0.6,
98
+ do_sample=True,
99
+ )
100
+
101
+ print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
102
+ ```
103
+
104
+ Unlike Strawberry-1, there's no need to set a `reasoning language` system message or parse out separate `analysis` / `final` channels — ChatBerry-1 goes straight to its final answer in the `final` channel, so decoding just the newly generated tokens with `skip_special_tokens=True` gives you the plain-text response directly.
105
+
106
+ ## Intended Use
107
+
108
+ ChatBerry-1 is intended for:
109
+
110
+ - General-purpose Farsi and multilingual chat assistants
111
+ - Applications where direct, low-latency responses are preferred over visible reasoning traces
112
+ - Research comparing reasoning vs. non-reasoning fine-tunes of the same base model
113
+
114
+ ## Limitations
115
+
116
+ - ChatBerry-1 trades away Strawberry-1's explicit chain-of-thought reasoning; for tasks that benefit from visible step-by-step reasoning, `artindnr/strawberry-1` may be a better fit.
117
+ - As with any fine-tune, ChatBerry-1 inherits the general capabilities and limitations of the `gpt-oss-20b` base model and the `strawberry-1` checkpoint it was built from, including the possibility of hallucinated facts.
118
+ - No formal safety fine-tuning beyond what is inherited from the base model and Strawberry-1 has been applied; use appropriate safeguards in production settings.
119
+
120
+ ## License
121
+
122
+ This model is released under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) license, consistent with the base `gpt-oss-20b` model and `strawberry-1`.
123
+
124
+ ## Citation
125
+
126
+ If you use ChatBerry in your work, please cite:
127
+
128
+ ```bibtex
129
+ @misc{chatberry1,
130
+ title = {ChatBerry: A Direct-Answer Chat Fine-tune of Strawberry-1},
131
+ author = {artindnr},
132
+ year = {2026},
133
+ url = {https://huggingface.co/artindnr/chatberry-1}
134
+ }
135
+ ```
136
+
137
+ ## Acknowledgements
138
+
139
+ Built on top of [`artindnr/strawberry-1`](https://huggingface.co/artindnr/strawberry-1), itself fine-tuned from [`openai/gpt-oss-20b`](https://huggingface.co/openai/gpt-oss-20b), using the [`xmanii/maux-gpt-sft-20k`](https://huggingface.co/datasets/xmanii/maux-gpt-sft-20k) dataset.