Update README.md
Browse files
README.md
CHANGED
|
@@ -11,4 +11,65 @@ tags:
|
|
| 11 |
- qwen
|
| 12 |
- deepseek
|
| 13 |
- text-generation-inference
|
| 14 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
- qwen
|
| 12 |
- deepseek
|
| 13 |
- text-generation-inference
|
| 14 |
+
---
|
| 15 |
+
# **Reasoning-Distilled-ta-7B**
|
| 16 |
+
|
| 17 |
+
Reasoning-Distilled-ta-7B is based on the *Qwen [KT] model*, which was distilled by *DeepSeek-AI/DeepSeek-R1-Distill-Qwen-7B*. It has been fine-tuned on specialized datasets focusing on **Tamil language-based reasoning tasks** and chain-of-thought (CoT) reasoning for problem-solving. This model is optimized for tasks requiring logical reasoning, detailed explanations, and multi-step problem-solving in the Tamil language, making it ideal for applications such as instruction-following, text generation, and complex reasoning tasks in Tamil.
|
| 18 |
+
|
| 19 |
+
# **Quickstart with Transformers**
|
| 20 |
+
|
| 21 |
+
Here is a code snippet using `apply_chat_template` to show you how to load the tokenizer and model and generate content in Tamil:
|
| 22 |
+
|
| 23 |
+
```python
|
| 24 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 25 |
+
|
| 26 |
+
model_name = "prithivMLmods/Reasoning-Distilled-ta-7B"
|
| 27 |
+
|
| 28 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 29 |
+
model_name,
|
| 30 |
+
torch_dtype="auto",
|
| 31 |
+
device_map="auto"
|
| 32 |
+
)
|
| 33 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 34 |
+
|
| 35 |
+
prompt = "பெரிய மொழி மாதிரிகள் பற்றி ஒரு சிறிய அறிமுகத்தை தரவும்."
|
| 36 |
+
messages = [
|
| 37 |
+
{"role": "system", "content": "நீங்கள் DeepSeek-AI மூலம் உருவாக்கப்பட்ட Reasoning-Distilled-ta-7B. நீங்கள் ஒரு சக்திவாய்ந்த தமிழ் பகுத்தறிவு உதவியாளர்."},
|
| 38 |
+
{"role": "user", "content": prompt}
|
| 39 |
+
]
|
| 40 |
+
text = tokenizer.apply_chat_template(
|
| 41 |
+
messages,
|
| 42 |
+
tokenize=False,
|
| 43 |
+
add_generation_prompt=True
|
| 44 |
+
)
|
| 45 |
+
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
| 46 |
+
|
| 47 |
+
generated_ids = model.generate(
|
| 48 |
+
**model_inputs,
|
| 49 |
+
max_new_tokens=512
|
| 50 |
+
)
|
| 51 |
+
generated_ids = [
|
| 52 |
+
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
| 53 |
+
]
|
| 54 |
+
|
| 55 |
+
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
| 56 |
+
print(response)
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
### **Intended Use:**
|
| 60 |
+
1. **Tamil Language Instruction-Following:** The model excels in understanding and executing detailed instructions in Tamil, making it ideal for automation systems, virtual assistants, and educational tools tailored for Tamil-speaking users.
|
| 61 |
+
2. **Tamil Text Generation:** It can produce coherent, logically structured, and contextually relevant text in Tamil for use in content creation, summarization, and report writing.
|
| 62 |
+
3. **Complex Reasoning Tasks in Tamil:** With its fine-tuning for chain-of-thought reasoning, the model is well-suited for multi-step problem-solving, logical deduction, and question-answering tasks in Tamil.
|
| 63 |
+
4. **Research and Development:** It can support researchers and developers in exploring advancements in Tamil language processing, logical reasoning, and fine-tuning methodologies.
|
| 64 |
+
5. **Educational Applications:** The model can assist in teaching logical reasoning and problem-solving in Tamil by generating step-by-step solutions.
|
| 65 |
+
|
| 66 |
+
### **Limitations:**
|
| 67 |
+
1. **Domain-Specific Knowledge:** While fine-tuned on reasoning datasets, the model may lack deep expertise in highly specialized or technical domains in Tamil.
|
| 68 |
+
2. **Hallucination:** Like many large language models, it can generate incorrect or fabricated information, especially when reasoning beyond its training data.
|
| 69 |
+
3. **Bias in Training Data:** The model's outputs may reflect biases present in the datasets it was fine-tuned on, which could limit its objectivity in certain contexts.
|
| 70 |
+
4. **Performance on Non-Reasoning Tasks:** The model is optimized for chain-of-thought reasoning and may underperform on tasks that require simpler, less structured responses.
|
| 71 |
+
5. **Resource-Intensive:** Running the model efficiently requires significant computational resources, which may limit accessibility for smaller-scale deployments.
|
| 72 |
+
6. **Dependence on Input Quality:** The model’s performance heavily depends on the clarity and quality of the input provided. Ambiguous or poorly structured prompts may yield suboptimal results.
|
| 73 |
+
7. **Limited Multilingual Support:** While optimized for Tamil, the model may not perform as well in other languages, especially those with significantly different linguistic structures.
|
| 74 |
+
|
| 75 |
+
This model is designed to empower Tamil-speaking users with advanced reasoning and text-generation capabilities, while also addressing the unique challenges of working with the Tamil language.
|