Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -1,3 +1,41 @@
|
|
1 |
-
---
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
base_model: Qwen/Qwen3-0.6B-Base
|
5 |
+
tags:
|
6 |
+
- qwen3
|
7 |
+
- fine-tuned
|
8 |
+
- narasimha
|
9 |
+
- conversational
|
10 |
+
license: apache-2.0
|
11 |
+
---
|
12 |
+
|
13 |
+
# Qwen3-0.6B Fine-tuned on Narasimha Dataset
|
14 |
+
|
15 |
+
This model is a fine-tuned version of [Qwen/Qwen3-0.6B-Base](https://huggingface.co/Qwen/Qwen3-0.6B-Base) on the Narasimha dataset.
|
16 |
+
|
17 |
+
## Training Details
|
18 |
+
- Base model: Qwen/Qwen3-0.6B-Base
|
19 |
+
- Dataset: sarthakrastogi/narasimha_dataset (500 samples)
|
20 |
+
- Training epochs: 1
|
21 |
+
- Batch size: 2
|
22 |
+
- Data type: bf16
|
23 |
+
|
24 |
+
## Usage
|
25 |
+
|
26 |
+
```python
|
27 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
28 |
+
|
29 |
+
model_name = "sarthakrastogi/narasimha-b-0.6b"
|
30 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
31 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")
|
32 |
+
|
33 |
+
# Generate response
|
34 |
+
content = "your question here"
|
35 |
+
messages = [{"role": "user", "content": content}]
|
36 |
+
prompt_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, enable_thinking=False)
|
37 |
+
inputs = tokenizer(prompt_text, return_tensors="pt").to(model.device)
|
38 |
+
output_ids = model.generate(**inputs, max_new_tokens=100)
|
39 |
+
response = tokenizer.decode(output_ids[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True)
|
40 |
+
print(response)
|
41 |
+
```
|