Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,104 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
base_model:
|
6 |
+
- Qwen/Qwen3-1.7B
|
7 |
+
pipeline_tag: text-generation
|
8 |
+
library_name: transformers
|
9 |
+
tags:
|
10 |
+
- text-generation-inference
|
11 |
+
- code
|
12 |
+
- trl
|
13 |
+
---
|
14 |
+
|
15 |
+

|
16 |
+
|
17 |
+
# **Pyxidis-Manim-CodeGen-1.7B (Experimental)**
|
18 |
+
|
19 |
+
> **Pyxidis-Manim-CodeGen-1.7B** is an **experimental math animation coding model** fine-tuned on **Qwen/Qwen3-1.7B** using **Manim-CodeGen code traces**.
|
20 |
+
> It is specialized for **Python-based mathematical animations with Manim**, making it ideal for educators, researchers, and developers working on math visualization and animation pipelines.
|
21 |
+
|
22 |
+
> \[!note]
|
23 |
+
> GGUF: [https://huggingface.co/prithivMLmods/Pyxidis-Manim-CodeGen-1.7B-GGUF](https://huggingface.co/prithivMLmods/Pyxidis-Manim-CodeGen-1.7B-GGUF)
|
24 |
+
|
25 |
+
---
|
26 |
+
|
27 |
+
## **Key Features**
|
28 |
+
|
29 |
+
1. **Manim-Specific Code Generation**
|
30 |
+
Trained on **Manim-CodeGen traces**, optimized for **Python-based animation scripting** of mathematical concepts and visual proofs.
|
31 |
+
|
32 |
+
2. **Math + Code Synergy**
|
33 |
+
Generates step-by-step **math derivations with corresponding animation code**, bridging symbolic reasoning with visualization.
|
34 |
+
|
35 |
+
3. **Animation Workflow Optimization**
|
36 |
+
Provides structured code for **scenes, transformations, graphs, and equations** in Manim, reducing boilerplate and debugging effort.
|
37 |
+
|
38 |
+
4. **Python-Centric Reasoning**
|
39 |
+
Produces **clean, modular, and reusable Python code**, supporting educational and research-driven animation pipelines.
|
40 |
+
|
41 |
+
5. **Structured Output Mastery**
|
42 |
+
Capable of outputting in **Python**, **Markdown**, and **LaTeX**, ideal for tutorials, educational notebooks, and automated video generation workflows.
|
43 |
+
|
44 |
+
6. **Lightweight but Specialized**
|
45 |
+
Focused on **Manim coding efficiency** while maintaining a deployable footprint for **GPU clusters** and **research labs**.
|
46 |
+
|
47 |
+
---
|
48 |
+
|
49 |
+
## **Quickstart with Transformers**
|
50 |
+
|
51 |
+
```python
|
52 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
53 |
+
|
54 |
+
model_name = "prithivMLmods/Pyxidis-Manim-CodeGen-1.7B"
|
55 |
+
|
56 |
+
model = AutoModelForCausalLM.from_pretrained(
|
57 |
+
model_name,
|
58 |
+
torch_dtype="auto",
|
59 |
+
device_map="auto"
|
60 |
+
)
|
61 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
62 |
+
|
63 |
+
prompt = "Write a Manim script to animate the Pythagorean theorem using squares on the triangle's sides."
|
64 |
+
|
65 |
+
messages = [
|
66 |
+
{"role": "system", "content": "You are a Python coding assistant specialized in Manim-based math animations."},
|
67 |
+
{"role": "user", "content": prompt}
|
68 |
+
]
|
69 |
+
|
70 |
+
text = tokenizer.apply_chat_template(
|
71 |
+
messages,
|
72 |
+
tokenize=False,
|
73 |
+
add_generation_prompt=True
|
74 |
+
)
|
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=512
|
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 |
+
---
|
91 |
+
|
92 |
+
## **Intended Use**
|
93 |
+
|
94 |
+
* **Manim-based math animation coding** for research, teaching, and content creation
|
95 |
+
* **Educational visualization assistant** to convert math problems into animations
|
96 |
+
* **Python tutoring tool** for math-heavy animation workflows
|
97 |
+
* **Prototype generator** for interactive STEM video content
|
98 |
+
|
99 |
+
## **Limitations**
|
100 |
+
|
101 |
+
* Experimental model – may generate code requiring manual debugging
|
102 |
+
* Limited to **Manim coding workflows**, not general-purpose code assistant
|
103 |
+
* May not handle **complex multi-scene projects** without iterative refinement
|
104 |
+
* Prioritizes structured math + animation reasoning, less optimized for general dialogue
|