Upload Shivik-2B-Reasoning-Expanded
Browse files
README.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- reasoning
|
| 7 |
+
- chain-of-thought
|
| 8 |
+
- cot
|
| 9 |
+
- thinking
|
| 10 |
+
- llama
|
| 11 |
+
base_model: Qwen/Qwen2.5-1.5B
|
| 12 |
+
pipeline_tag: text-generation
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# Shivik-2B-Reasoning-Expanded
|
| 16 |
+
|
| 17 |
+
A reasoning-optimized language model with Chain-of-Thought (CoT) capabilities using `<think>` tags.
|
| 18 |
+
|
| 19 |
+
## Model Details
|
| 20 |
+
|
| 21 |
+
| Property | Value |
|
| 22 |
+
|----------|-------|
|
| 23 |
+
| Parameters | Unknown |
|
| 24 |
+
| Hidden Size | Unknown |
|
| 25 |
+
| Layers | Unknown |
|
| 26 |
+
| Context Length | Unknown |
|
| 27 |
+
| CoT Support | ✅ Yes (`<think>` tags) |
|
| 28 |
+
|
| 29 |
+
## Usage
|
| 30 |
+
|
| 31 |
+
```python
|
| 32 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 33 |
+
|
| 34 |
+
model_id = "shivash/Shivik-2B-Reasoning-Expanded"
|
| 35 |
+
|
| 36 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 37 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 38 |
+
model_id,
|
| 39 |
+
torch_dtype="auto",
|
| 40 |
+
device_map="auto"
|
| 41 |
+
)
|
| 42 |
+
|
| 43 |
+
# For reasoning tasks, the model uses <think> tags
|
| 44 |
+
prompt = "Solve this step by step: What is 15% of 80?"
|
| 45 |
+
|
| 46 |
+
messages = [
|
| 47 |
+
{"role": "user", "content": prompt}
|
| 48 |
+
]
|
| 49 |
+
|
| 50 |
+
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 51 |
+
inputs = tokenizer(text, return_tensors="pt").to(model.device)
|
| 52 |
+
|
| 53 |
+
outputs = model.generate(
|
| 54 |
+
**inputs,
|
| 55 |
+
max_new_tokens=512,
|
| 56 |
+
temperature=0.7,
|
| 57 |
+
do_sample=True,
|
| 58 |
+
)
|
| 59 |
+
|
| 60 |
+
response = tokenizer.decode(outputs[0], skip_special_tokens=False)
|
| 61 |
+
print(response)
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
## Chain-of-Thought Format
|
| 65 |
+
|
| 66 |
+
The model uses `<think>` tags for internal reasoning:
|
| 67 |
+
|
| 68 |
+
```
|
| 69 |
+
<think>
|
| 70 |
+
Let me work through this step by step...
|
| 71 |
+
15% means 15/100 = 0.15
|
| 72 |
+
0.15 × 80 = 12
|
| 73 |
+
</think>
|
| 74 |
+
|
| 75 |
+
The answer is 12.
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
## Training
|
| 79 |
+
|
| 80 |
+
This model was trained on reasoning datasets with Chain-of-Thought demonstrations.
|
| 81 |
+
|
| 82 |
+
## License
|
| 83 |
+
|
| 84 |
+
Apache 2.0
|