prithivMLmods commited on
Commit
106ad94
·
verified ·
1 Parent(s): a6a482e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +113 -1
README.md CHANGED
@@ -15,4 +15,116 @@ tags:
15
  - gspo
16
  - coder
17
  - code
18
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  - gspo
16
  - coder
17
  - code
18
+ ---
19
+
20
+ # **rStar-Coder-Qwen3(exp)**
21
+
22
+ > *rStar-Coder-Qwen3* is a high-efficiency, multi-domain model fine-tuned on *Qwen3-4B* using the **rStar-Coder** dataset enhanced with **code, math, and science expert clusters** and an extended **open code reasoning dataset**. This model blends symbolic precision, scientific logic, and structured output fluency—making it an ideal tool for developers, educators, and researchers seeking advanced reasoning under constrained compute.
23
+
24
+ > \[!note]
25
+ > GGUF: [https://huggingface.co/prithivMLmods/rStar-Coder-Qwen3-GGUF](https://huggingface.co/prithivMLmods/rStar-Coder-Qwen3-GGUF)
26
+
27
+ ---
28
+
29
+ ## **Key Features**
30
+
31
+ 1. **Unified Reasoning Across Code, Math & Science**
32
+ Fine-tuned on **expert clusters** spanning programming, mathematics, and scientific logic, alongside an **open code reasoning dataset**, boosting multi-modal symbolic reasoning.
33
+
34
+ 2. **Advanced Code Reasoning & Generation**
35
+ Supports multi-language coding with explanations, optimization hints, and error detection—ideal for full-stack prototyping, algorithm synthesis, and debugging workflows.
36
+
37
+ 3. **Scientific Problem Solving**
38
+ Performs analytical reasoning in physics, biology, and chemistry—explaining concepts, solving equations, and handling symbolic derivations step-by-step.
39
+
40
+ 4. **Hybrid Symbolic-AI Thinking**
41
+ Combines structured logic, chain-of-thought reasoning, and open-ended inference, delivering robust performance on STEM tasks and complex prompt decomposition.
42
+
43
+ 5. **Structured Output Mastery**
44
+ Seamlessly generates output in **LaTeX**, **Markdown**, **JSON**, **CSV**, and **YAML**, suited for research reports, technical documentation, and data formats.
45
+
46
+ 6. **Optimized 4B Footprint for Versatile Deployment**
47
+ Strikes a balance between performance and efficiency, making it deployable on **mid-range GPUs**, **offline clusters**, and advanced **edge AI systems**.
48
+
49
+ ---
50
+
51
+ ## **Quickstart with Transformers**
52
+
53
+ ```python
54
+ from transformers import AutoModelForCausalLM, AutoTokenizer
55
+
56
+ model_name = "prithivMLmods/rStar-Coder-Qwen3"
57
+
58
+ model = AutoModelForCausalLM.from_pretrained(
59
+ model_name,
60
+ torch_dtype="auto",
61
+ device_map="auto"
62
+ )
63
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
64
+
65
+ prompt = "Explain the difference between Newtonian mechanics and quantum mechanics with examples."
66
+
67
+ messages = [
68
+ {"role": "system", "content": "You are a scientific tutor skilled in code, math, and reasoning."},
69
+ {"role": "user", "content": prompt}
70
+ ]
71
+
72
+ text = tokenizer.apply_chat_template(
73
+ messages,
74
+ tokenize=False,
75
+ add_generation_prompt=True
76
+ )
77
+
78
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
79
+
80
+ generated_ids = model.generate(
81
+ **model_inputs,
82
+ max_new_tokens=512
83
+ )
84
+ generated_ids = [
85
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
86
+ ]
87
+
88
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
89
+ print(response)
90
+ ```
91
+
92
+ ---
93
+
94
+ ## **Dataset Seed**
95
+
96
+ ```python
97
+ from datasets import load_dataset
98
+
99
+ # Load the reasoning dataset
100
+ reasoning_dataset = load_dataset(
101
+ "microsoft/rStar-Coder",
102
+ data_files="seed_sft/data-00001-of-00020.parquet",
103
+ split="train"
104
+ )
105
+ ```
106
+
107
+ ---
108
+
109
+ ## **Intended Use**
110
+
111
+ * Scientific tutoring, computational logic, and mathematical education
112
+ * Advanced coding assistant for algorithm design, code reviews, and documentation
113
+ * Structured technical data generation across formats and fields
114
+ * STEM-focused chatbot or API for research and education tools
115
+ * Mid-resource deployment requiring high symbolic fidelity
116
+
117
+ ## **Limitations**
118
+
119
+ * Not tuned for general-purpose or long-form creative writing
120
+ * Context limitations may hinder multi-document or full codebase analysis
121
+ * Specialized in technical and symbolic tasks—general chat may underperform
122
+ * Prioritizes structured reasoning over emotional or casual tone generation
123
+
124
+ ---
125
+
126
+ ## **References**
127
+
128
+ 1. [Qwen2.5 Technical Report (2024)](https://arxiv.org/pdf/2412.15115)
129
+ 2. [YaRN: Efficient Context Window Extension of Large Language Models](https://arxiv.org/pdf/2309.00071)
130
+ 3. [rStar-Coder Dataset](https://huggingface.co/datasets/microsoft/rStar-Coder)