prithivMLmods commited on
Commit
fc013a7
·
verified ·
1 Parent(s): 0eaef0c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +93 -1
README.md CHANGED
@@ -15,4 +15,96 @@ tags:
15
  - text-generation-inference
16
  - math
17
  - thinker
18
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  - text-generation-inference
16
  - math
17
  - thinker
18
+ ---
19
+
20
+ # **Open-Xi-Math-Preview**
21
+
22
+ > **Open-Xi-Math-Preview** is a **mathematics-focused reasoning model** fine-tuned on **Qwen2-1.5B-Instruct**, utilizing a **modular dataset** designed for enhancing **mathematical thinking**. It provides robust capabilities in symbolic reasoning, structured deduction, and compact coding — optimized for edge deployment on **resource-constrained devices**.
23
+
24
+ ## **Key Improvements**
25
+
26
+ 1. **Mathematical Reasoning via Modular Data**:
27
+ Fine-tuned on diverse and structured math-focused datasets to handle problem-solving, symbolic computation, and multi-step derivations with efficiency on low-power devices.
28
+
29
+ 2. **Compact Coding & Math Assistant**:
30
+ Understands multiple programming languages and math representations (e.g., LaTeX, symbolic algebra). Ideal for math-enhanced embedded coding and problem-solving environments.
31
+
32
+ 3. **Error Detection in Structured Data**:
33
+ Accurately detects and corrects logical errors, malformed math expressions, and data structures (e.g., JSON, XML, LaTeX), all while maintaining low inference latency.
34
+
35
+ 4. **Instruction Following for Problem-Solving**:
36
+ Enhanced with strong instruction-following performance, particularly for step-wise solutions in math word problems, logic puzzles, and equation derivations.
37
+
38
+ 5. **Extended Context Support**:
39
+ Supports **128K token inputs** and **8K token outputs**, enabling it to work with long math chains-of-thought and proofs, while remaining lightweight enough for edge inference.
40
+
41
+ ## **Quickstart with Transformers**
42
+
43
+ ```python
44
+ from transformers import AutoModelForCausalLM, AutoTokenizer
45
+
46
+ model_name = "your-username/Open-Xi-Math-Preview"
47
+
48
+ model = AutoModelForCausalLM.from_pretrained(
49
+ model_name,
50
+ torch_dtype="auto",
51
+ device_map="auto"
52
+ )
53
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
54
+
55
+ prompt = "Solve the equation: 2x^2 - 4x - 6 = 0. Show all steps."
56
+ messages = [
57
+ {"role": "system", "content": "You are a helpful and concise mathematical reasoning assistant."},
58
+ {"role": "user", "content": prompt}
59
+ ]
60
+ text = tokenizer.apply_chat_template(
61
+ messages,
62
+ tokenize=False,
63
+ add_generation_prompt=True
64
+ )
65
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
66
+
67
+ generated_ids = model.generate(
68
+ **model_inputs,
69
+ max_new_tokens=512
70
+ )
71
+ generated_ids = [
72
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
73
+ ]
74
+
75
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
76
+ ```
77
+
78
+ ## **Intended Use**
79
+
80
+ 1. **Math-Centric Edge Applications**:
81
+ Designed for embedded AI systems in calculators, educational tools, and mobile math tutoring.
82
+
83
+ 2. **Advanced Math Reasoning**:
84
+ Effective for solving algebra, geometry, calculus, and competition math problems using logical derivation.
85
+
86
+ 3. **Educational & Instructional Aids**:
87
+ Useful for step-by-step teaching in math-heavy domains like STEM education, coding classes, and robotics kits.
88
+
89
+ 4. **Low-Latency Math Agents**:
90
+ Deployable in customer support bots, interactive kiosks, and STEM-based IoT systems for fast math-based interactions.
91
+
92
+ 5. **Structured Output Generation**:
93
+ Generates LaTeX, JSON, or tabular formats for math answers and reasoning in structured pipelines.
94
+
95
+ ## **Limitations**
96
+
97
+ 1. **Edge Hardware Still Required**:
98
+ Though lightweight, best used with devices equipped with NPUs, GPUs, or optimized ML accelerators.
99
+
100
+ 2. **No Internet or Real-Time Info**:
101
+ Static knowledge cutoff; cannot retrieve or interact with live external data sources.
102
+
103
+ 3. **Not Suited for Creative Tasks**:
104
+ Focused on deterministic reasoning — not built for abstract, poetic, or generative creative writing.
105
+
106
+ 4. **Prompt Sensitivity**:
107
+ Clear, structured prompts yield more accurate reasoning; ambiguous questions may degrade output quality.
108
+
109
+ 5. **Potential Dataset Biases**:
110
+ Model may carry forward biases or inconsistencies present in the training datasets; vet outputs in critical settings.