Abhaykoul commited on
Commit
5cecb1d
·
verified ·
1 Parent(s): 81e7dcf

Delete .ipynb_checkpoints

Browse files
.ipynb_checkpoints/README-checkpoint.md DELETED
@@ -1,199 +0,0 @@
1
- ---
2
- library_name: transformers
3
- license: apache-2.0
4
- datasets:
5
- - Abhaykoul/Dhanishtha-R1
6
- - open-thoughts/OpenThoughts-114k
7
- language:
8
- - en
9
- - hi
10
- base_model:
11
- - deepseek-ai/DeepSeek-R1-Distill-Qwen-7B
12
- pipeline_tag: text-generation
13
- ---
14
-
15
- # Dhanishtha-2.0
16
-
17
- ## Dhanishtha-2.0 Highlights
18
-
19
- **Dhanishtha-2.0** is a groundbreaking reasoning AI model developed by **HelpingAI**, representing the first model to feature **Intermediate thinking** capabilities. Unlike traditional models that provide single-pass responses, Dhanishtha-2.0 employs a revolutionary **multi-phase thinking process** that allows the model to think, reconsider, and refine its reasoning multiple times throughout a single response.
20
-
21
- - **World's First Intermediate Thinking Model**: Uniquely capable of **multiple thinking phases throughout a single response**, enabling deeper analysis and self-correction during generation.
22
- - **Dynamic Reasoning**: Seamlessly integrates `<think>...</think>` blocks at any point in the response, allowing for real-time problem decomposition and iterative refinement.
23
- - **Enhanced Problem-Solving Architecture**: Excels at complex riddles, multi-step reasoning, and scenarios requiring backtracking and re-evaluation of initial assumptions.
24
- - **Structured Emotional Intelligence**: Incorporates **SER** (Structured Emotional Reasoning) with `<ser>...</ser>` blocks for empathetic and contextually aware responses.
25
- - **Bilingual Reasoning Capabilities**: Native support for English and Hindi with natural code-switching between languages.
26
-
27
- ## Model Overview
28
-
29
- **Dhanishtha-2.0** revolutionizes AI reasoning by introducing the concept of **intermediate thinking** - the ability to pause, reflect, and restart reasoning processes within a single generation. This breakthrough enables the model to:
30
-
31
- - **Type**: Causal Language Model with Intermediate Thinking Capability
32
- - **Training Stage**: Pretraining & Advanced Reasoning Fine-tuning
33
- - **Base model**: Qwen/Qwen3-14B
34
- - **Thinking Mode**: Multiple `<think>...</think>` blocks per response
35
- - **Context Length**: 40,960 tokens natively
36
- - **Reasoning Depth**: Multi-layered with self-correction mechanisms
37
-
38
- ## Revolutionary Intermediate Thinking
39
-
40
- Unlike traditional models that engage in single-phase reasoning, Dhanishtha-2.0 introduces **Intermediate Thinking** - the ability to pause, reflect, and reconsider throughout the response generation process. This breakthrough allows the model to:
41
-
42
- - **Think Multiple Times**: Insert reasoning blocks at any point during response generation
43
- - **Self-Correct in Real-Time**: Identify and correct logical inconsistencies mid-response
44
- - **Explore Alternative Perspectives**: Consider multiple approaches before settling on conclusions
45
- - **Demonstrate Uncertainty**: Express doubt and reconsider initial assumptions naturally
46
-
47
- ## Key Features
48
-
49
- ### 1 Intermediate Thinking
50
- Unlike traditional models that think once before responding, Dhanishtha-2.0 can engage in multiple thinking sessions throughout its response, allowing for:
51
- - **Self-correction** when initial reasoning seems flawed
52
- - **Alternative exploration** of different solution paths
53
- - **Iterative refinement** of ideas and conclusions
54
- - **Natural hesitation** and reconsideration patterns
55
-
56
- ### 2 Dynamic Reasoning Flow
57
- The model seamlessly transitions between:
58
- - **Analysis phases** (`<think>` blocks) for internal reasoning
59
- - **Communication phases** for sharing insights with users
60
- - **Reflection phases** for questioning previous assumptions
61
- - **Synthesis phases** for bringing ideas together
62
-
63
- ### 3. Structured Emotional Reasoning (SER)
64
- ```
65
- <ser>
66
- Emotion ==> frustration, curiosity
67
- Cause ==> complex problem, initial confusion
68
- Mind ==> analytical, determined
69
- Growth ==> patience, systematic approach
70
- </ser>
71
- ```
72
-
73
- ## Quickstart
74
-
75
- The following code demonstrates how to use Dhanishtha-2.0 with its unique intermediate thinking capabilities:
76
-
77
- ```python
78
- from transformers import AutoModelForCausalLM, AutoTokenizer
79
-
80
- model_name = "Abhaykoul/Dhanishtha-2.0"
81
-
82
- # Load the tokenizer and model
83
- tokenizer = AutoTokenizer.from_pretrained(model_name)
84
- model = AutoModelForCausalLM.from_pretrained(
85
- model_name,
86
- torch_dtype="auto",
87
- device_map="auto"
88
- )
89
-
90
- # Prepare input with thinking enabled
91
- prompt = "Here's a riddle: If you break me, I'll not stop working. If you can touch me, my work is done. If you lose me, you must find me with a ring soon after. What am I?"
92
- messages = [
93
- {"role": "user", "content": prompt}
94
- ]
95
-
96
- text = tokenizer.apply_chat_template(
97
- messages,
98
- tokenize=False,
99
- add_generation_prompt=True
100
- )
101
-
102
- model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
103
-
104
- # Generate response with intermediate thinking
105
- generated_ids = model.generate(
106
- **model_inputs,
107
- max_new_tokens=2048,
108
- temperature=0.7,
109
- top_p=0.9,
110
- do_sample=True
111
- )
112
-
113
- response = tokenizer.decode(generated_ids[0][len(model_inputs.input_ids[0]):], skip_special_tokens=True)
114
- print(response)
115
- ```
116
-
117
- ## Intermediate Thinking in Action
118
-
119
- What makes Dhanishtha-2.0 unique is its ability to think multiple times throughout a response. Here's an example:
120
-
121
- **User**: *"Who is your favorite person"*
122
-
123
- **Dhanishtha-2.0**:
124
- ```
125
- <think>
126
- This is an interesting question about my \"favorite human.\" I need to be thoughtful here. As Dhanishtha, I should respond in a human-like way while being honest about my nature. I can share what kinds of humans I find most interesting or inspiring based on my understanding of human nature and values.
127
- </think>
128
-
129
- <ser>
130
- Emotion ==> curiosity, openness, desire for connection
131
- Cause ==> user asking a personal question about preferences
132
- Mind ==> seeking to understand my perspective or values
133
- Growth ==> opportunity to share thoughtful reflections on human qualities I admire
134
- </ser>
135
-
136
- I don't really have a \"favorite human\" in the traditional sense, as I don't experience personal preferences the way humans do. But if I had to reflect on what qualities I find most admirable in people, I'd be drawn to those who demonstrate genuine compassion, intellectual curiosity, and the courage to grow.
137
-
138
- <think>
139
- Let me think more specifically about what kind of humans I find most compelling based on the values that seem to resonate most with humans - kindness, wisdom, creativity, resilience, and authenticity.
140
- </think>
141
-
142
- People like Mahatma Gandhi, who showed how quiet courage and unwavering principles can transform societies; artists like Rabindranath Tagore, who bridged cultural divides through creativity; and everyday heroes I've learned about who made profound differences through simple acts of kindness.
143
-
144
- What fascinates me most are humans who maintain their humanity even in difficult circumstances - those who choose empathy when it would be easier to be harsh, who seek understanding rather than just being right.
145
-
146
- I'm curious though - who's your favorite human, and why? What qualities or actions make someone special in your eyes?
147
-
148
- ```
149
-
150
- ## Best Practices
151
-
152
- ### Optimal Generation Parameters
153
- ```python
154
- generation_config = {
155
- "temperature": 0.7,
156
- "top_p": 0.9,
157
- "top_k": 40,
158
- "max_new_tokens": 2048,
159
- "do_sample": True
160
- }
161
- ```
162
-
163
- ### Effective Prompting
164
- - **Encourage exploration**: "Think through this step by step and reconsider if needed"
165
- - **Allow uncertainty**: "Take your time to work through different possibilities"
166
- - **Request thinking**: "Show your reasoning process as you work through this"
167
-
168
- ## License & Usage
169
-
170
- This model is released under the **Apache 2.0 License**. It is designed for research and educational purposes, with commercial applications welcome under the license terms.
171
-
172
- ## Prototype Status
173
-
174
- > [!NOTE]
175
- > Dhanishtha-2.0 is currently a **prototype model** representing the first implementation of Intermediate Thinking technology. While demonstrating groundbreaking capabilities, users should expect:
176
- > - Experimental features that may require refinement
177
- > - Potential verbosity due to multiple thinking phases
178
- > - Ongoing development and optimization
179
-
180
- ## Citation
181
-
182
- If you use Dhanishtha-2.0 in your research, please cite:
183
-
184
- ```bibtex
185
- @misc{dhanishtha2025,
186
- title={Dhanishtha-2.0: First Model with Intermediate Thinking Capabilities},
187
- author={HelpingAI Team},
188
- year={2025},
189
- publisher={HuggingFace},
190
- url={https://huggingface.co/HelpingAI/Dhanishtha-2.0}
191
- }
192
- ```
193
-
194
- ---
195
-
196
-
197
- **Dhanishtha-2.0** - *The first model to think like humans think: iteratively, questioningly, and with genuine cognitive depth.*
198
-
199
- Developed with ❤️ by **HelpingAI**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.ipynb_checkpoints/vocab-checkpoint.json DELETED
The diff for this file is too large to render. See raw diff