Update README.md
Browse files
README.md
CHANGED
@@ -17,4 +17,95 @@ tags:
|
|
17 |
- code
|
18 |
- math
|
19 |
- trl
|
20 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
- code
|
18 |
- math
|
19 |
- trl
|
20 |
+
---
|
21 |
+
|
22 |
+
# Bootes-Qwen3\_Coder-Reasoning
|
23 |
+
|
24 |
+
> Bootes-Qwen3\_Coder-Reasoning is a fine-tuned variant of the Qwen3-4B architecture, optimized for high-accuracy code reasoning and structured logical task completion. Trained on the CodeAlpaca\_20K dataset and additional curated programming corpora, this model is designed to perform technical coding, reasoning, and instruction-following tasks with lightweight computational requirements.
|
25 |
+
|
26 |
+
## Key Features
|
27 |
+
|
28 |
+
1. Code Reasoning with CodeAlpaca\_20K and More
|
29 |
+
Fine-tuned on CodeAlpaca\_20K and supplementary high-quality datasets focused on:
|
30 |
+
|
31 |
+
* Multi-language programming tasks
|
32 |
+
* Code explanation, completion, and debugging
|
33 |
+
* Instruction-following with step-wise execution logic
|
34 |
+
|
35 |
+
2. Cross-Language Code Understanding
|
36 |
+
Handles Python, JavaScript, C++, and more. Ideal for code generation, transformation, bug-fixing, and logic validation.
|
37 |
+
|
38 |
+
3. Structured Output Generation
|
39 |
+
Delivers responses in Markdown, JSON, YAML, and structured code blocks. Optimized for IDE workflows, documentation tools, and reproducible computation notebooks.
|
40 |
+
|
41 |
+
4. Instruction-Tuned for Developer Use Cases
|
42 |
+
Maintains strong fidelity to user prompts, especially multi-turn or step-by-step technical instructions across engineering and data workflows.
|
43 |
+
|
44 |
+
5. Multilingual Reasoning in Technical Domains
|
45 |
+
Capable of technical comprehension and explanation in over 20 human languages, supporting global developer audiences.
|
46 |
+
|
47 |
+
6. Efficient 4B Architecture
|
48 |
+
Based on Qwen3-4B for a performance-efficient inference model that scales well on mid-range GPUs and cloud deployment setups.
|
49 |
+
|
50 |
+
## Quickstart with Transformers
|
51 |
+
|
52 |
+
```python
|
53 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
54 |
+
|
55 |
+
model_name = "prithivMLmods/Bootes-Qwen3_Coder-Reasoning"
|
56 |
+
|
57 |
+
model = AutoModelForCausalLM.from_pretrained(
|
58 |
+
model_name,
|
59 |
+
torch_dtype="auto",
|
60 |
+
device_map="auto"
|
61 |
+
)
|
62 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
63 |
+
|
64 |
+
prompt = "Write a Python function to check whether a number is a palindrome. Explain each step."
|
65 |
+
|
66 |
+
messages = [
|
67 |
+
{"role": "system", "content": "You are a precise coding and reasoning assistant trained on CodeAlpaca and developer datasets."},
|
68 |
+
{"role": "user", "content": prompt}
|
69 |
+
]
|
70 |
+
|
71 |
+
text = tokenizer.apply_chat_template(
|
72 |
+
messages,
|
73 |
+
tokenize=False,
|
74 |
+
add_generation_prompt=True
|
75 |
+
)
|
76 |
+
|
77 |
+
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
78 |
+
|
79 |
+
generated_ids = model.generate(
|
80 |
+
**model_inputs,
|
81 |
+
max_new_tokens=512
|
82 |
+
)
|
83 |
+
generated_ids = [
|
84 |
+
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
85 |
+
]
|
86 |
+
|
87 |
+
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
88 |
+
print(response)
|
89 |
+
```
|
90 |
+
|
91 |
+
## Intended Use
|
92 |
+
|
93 |
+
* Code generation, completion, and explanation
|
94 |
+
* Multi-step algorithmic reasoning
|
95 |
+
* Structured technical document generation (Markdown, JSON, YAML)
|
96 |
+
* Debugging assistance and refactoring suggestions
|
97 |
+
* Technical tutoring and developer assistant workflows
|
98 |
+
* Cross-lingual programming education and translation
|
99 |
+
|
100 |
+
## Limitations
|
101 |
+
|
102 |
+
* May underperform on non-code-related creative writing
|
103 |
+
* Limited context window versus larger models
|
104 |
+
* Sensitive to prompt phrasing for ambiguous instructions
|
105 |
+
* Occasionally over-justifies code when brevity is desired
|
106 |
+
|
107 |
+
## References
|
108 |
+
|
109 |
+
1. Qwen2.5 Technical Report – [https://arxiv.org/pdf/2412.15115](https://arxiv.org/pdf/2412.15115)
|
110 |
+
2. CodeAlpaca Dataset – [https://github.com/sahil280114/codealpaca](https://github.com/sahil280114/codealpaca)
|
111 |
+
3. YaRN: Context Window Extension for LLMs – [https://arxiv.org/pdf/2309.00071](https://arxiv.org/pdf/2309.00071)
|