prithivMLmods commited on
Commit
8b012f7
·
verified ·
1 Parent(s): afe808c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +86 -1
README.md CHANGED
@@ -12,4 +12,89 @@ library_name: transformers
12
  tags:
13
  - text-generation-inference
14
  - Qwen
15
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  tags:
13
  - text-generation-inference
14
  - Qwen
15
+ ---
16
+ # **Qwen2.5-3B-Tamil-Exp**
17
+
18
+ **Qwen2.5-3B-Tamil-Exp** is built on the robust Qwen2.5 architecture and has been specifically adapted to excel at Tamil language tasks. By incorporating training log entries from the prithivMLmods/Deepthink-Reasoning-Tamil dataset along with the proven reasoning framework of Qwen models, this 3B-parameter variant achieves enhanced chain-of-thought reasoning and logical problem solving—especially tailored for Tamil. Its improvements extend to context understanding, structured data processing, and long-context comprehension, making it ideal for complex reasoning tasks, instruction-following, and text generation in Tamil and other languages.
19
+
20
+ ### **Key Improvements**
21
+ 1. **Advanced Reasoning & Logic:**
22
+ Optimized for multi-step problem solving and logical deduction. Fine-tuning on the Deepthink-Reasoning-Tamil entries further refines its reasoning capabilities in Tamil contexts.
23
+
24
+ 2. **Fine-Tuned Instruction Following:**
25
+ Generates precise responses and structured outputs (such as JSON), making it well-suited for dialog-based applications and code generation tasks that require strict adherence to Tamil language instructions.
26
+
27
+ 3. **Greater Adaptability:**
28
+ Excels in role-playing scenarios, multi-turn dialogues, and diverse system prompts with a focus on culturally nuanced Tamil content while maintaining support for multiple languages.
29
+
30
+ 4. **Long-Context Support:**
31
+ Capable of handling extended inputs (up to 64K tokens) and generating outputs of up to 4K tokens, enabling the processing of detailed and lengthy Tamil texts.
32
+
33
+ 5. **Multilingual Proficiency with Tamil Focus:**
34
+ While supporting over 20 languages, the model’s training emphasis on Tamil ensures superior performance on tasks involving Tamil language understanding and generation.
35
+
36
+ ### **Intended Use**
37
+ - **Advanced Logical & Analytical Reasoning:**
38
+ Ideal for solving multi-step problems and deductive reasoning tasks, especially those presented in Tamil.
39
+ - **Mathematical & Scientific Computation:**
40
+ Supports theorem proving, complex calculations, and retrieval of scientific knowledge with an emphasis on Tamil terminology.
41
+ - **Code Generation & Debugging:**
42
+ Generates optimized code, detects errors, and enhances programming workflows with support for Tamil documentation or comments.
43
+ - **Structured Data Analysis:**
44
+ Processes tables, JSON, and other structured formats, which is particularly useful for localized applications requiring Tamil language outputs.
45
+ - **Multilingual Reasoning & Translation:**
46
+ While excelling in Tamil, it is also proficient in other languages for international applications.
47
+ - **Extended Text Generation:**
48
+ Capable of producing research papers, instructional guides, and in-depth reports in Tamil.
49
+
50
+ ### **Quickstart with Transformers**
51
+
52
+ Below is an example of how to load and use the model with the Hugging Face Transformers library:
53
+
54
+ ```python
55
+ from transformers import AutoModelForCausalLM, AutoTokenizer
56
+
57
+ model_name = "your_org/Qwen2.5-3B-Tamil-Exp"
58
+
59
+ model = AutoModelForCausalLM.from_pretrained(
60
+ model_name,
61
+ torch_dtype="auto",
62
+ device_map="auto"
63
+ )
64
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
65
+
66
+ prompt = "தமிழில் தர்க்கரீதியான எண்ணத்தை விளக்குங்கள்." # "Explain the concept of logical reasoning in Tamil."
67
+ messages = [
68
+ {"role": "system", "content": "நீங்கள் ஒரு தமிழில் சிறந்த தர்க்கரீதியான உதவியாளர்."},
69
+ {"role": "user", "content": prompt}
70
+ ]
71
+ text = tokenizer.apply_chat_template(
72
+ messages,
73
+ tokenize=False,
74
+ add_generation_prompt=True
75
+ )
76
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
77
+
78
+ generated_ids = model.generate(
79
+ **model_inputs,
80
+ max_new_tokens=256
81
+ )
82
+ generated_ids = [
83
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
84
+ ]
85
+
86
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
87
+ print(response)
88
+ ```
89
+
90
+ ### **Limitations**
91
+ 1. **Moderate Computational Requirements:**
92
+ Requires mid-end consumer GPUs for optimal inference.
93
+ 2. **Language-Specific Variability:**
94
+ While performance is strong for Tamil, results may vary for other supported languages.
95
+ 3. **Potential Error Accumulation:**
96
+ Extended outputs may sometimes introduce inconsistencies.
97
+ 4. **Limited Real-World Awareness:**
98
+ The model’s knowledge is based on its training data and may not include recent events.
99
+ 5. **Prompt Sensitivity:**
100
+ High-quality responses depend on the clarity and specificity of the input prompt.