Daemontatox commited on
Commit
b4eb665
·
verified ·
1 Parent(s): 2885208

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +132 -6
README.md CHANGED
@@ -5,17 +5,143 @@ tags:
5
  - transformers
6
  - unsloth
7
  - qwen3
 
 
 
 
8
  license: apache-2.0
9
  language:
10
  - en
 
 
 
11
  ---
12
 
13
- # Uploaded finetuned model
14
 
15
- - **Developed by:** Daemontatox
16
- - **License:** apache-2.0
17
- - **Finetuned from model :** unsloth/qwen3-1.7b-unsloth-bnb-4bit
18
 
19
- This qwen3 model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
20
 
21
- [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  - transformers
6
  - unsloth
7
  - qwen3
8
+ - rust
9
+ - code
10
+ - idiomatic rust
11
+ - reasoning
12
  license: apache-2.0
13
  language:
14
  - en
15
+ datasets:
16
+ - Tesslate/Rust_Dataset
17
+ library_name: transformers
18
  ---
19
 
20
+ # Tiny-OR1-Rust
21
 
22
+ **A lightweight Rust code assistant model for code generation, completion, and explanation.**
 
 
23
 
24
+ ## Model Description
25
 
26
+ Tiny-OR1-Rust is a specialized language model fine-tuned from Qwen3-1.7B for Rust programming tasks. Built on the efficient Qwen3 architecture, this 1.7B parameter model provides effective code generation, completion, and explanation capabilities specifically tailored for the Rust programming language while maintaining a compact footprint.
27
+
28
+ ## Model Details
29
+
30
+ - **Model Name**: Tiny-OR1-Rust
31
+ - **Developer**: Daemontatox
32
+ - **Model Type**: Code Generation / Text-to-Code
33
+ - **Language**: Rust
34
+ - **Architecture**: Qwen3-based Transformer
35
+ - **Parameters**: 1.7B
36
+ - **Base Model**: Qwen3-1.7B
37
+ - **Training Dataset**: Tesslate/Rust_Dataset
38
+
39
+ ## Intended Use
40
+
41
+ ### Primary Use Cases
42
+ - **Code Generation**: Generate Rust code from natural language descriptions
43
+ - **Code Completion**: Complete partial Rust code snippets
44
+ - **Code Explanation**: Explain Rust code functionality and concepts
45
+ - **Learning Assistant**: Help developers learn Rust programming patterns and best practices
46
+
47
+ ### Intended Users
48
+ - Rust developers and learners
49
+ - Students studying systems programming
50
+ - Developers transitioning to Rust from other languages
51
+ - Code editors and IDEs integrating Rust assistance
52
+
53
+ ## How to Use
54
+
55
+ ### Basic Usage
56
+
57
+ ```python
58
+ from transformers import AutoTokenizer, AutoModelForCausalLM
59
+
60
+ # Load model and tokenizer
61
+ tokenizer = AutoTokenizer.from_pretrained("Daemontatox/Tiny-OR1-Rust")
62
+ model = AutoModelForCausalLM.from_pretrained("Daemontatox/Tiny-OR1-Rust")
63
+
64
+ # Example prompt
65
+ prompt = "Write a Rust function to calculate factorial:"
66
+
67
+ # Generate code
68
+ inputs = tokenizer.encode(prompt, return_tensors="pt")
69
+ outputs = model.generate(inputs, max_length=150, temperature=0.7, pad_token_id=tokenizer.eos_token_id)
70
+ generated_code = tokenizer.decode(outputs[0], skip_special_tokens=True)
71
+
72
+ print(generated_code)
73
+ ```
74
+
75
+ ### Prompt Examples
76
+
77
+ **Code Generation:**
78
+ ```
79
+ "Write a Rust function that reads a file and counts the number of lines:"
80
+ "Create a Rust struct for a binary tree with insert and search methods:"
81
+ "Implement a thread-safe counter using Arc and Mutex in Rust:"
82
+ ```
83
+
84
+ **Code Explanation:**
85
+ ```
86
+ "Explain this Rust code: fn main() { let x = vec![1, 2, 3]; }"
87
+ "What does the ? operator do in Rust error handling?"
88
+ ```
89
+
90
+ ## Training Data
91
+
92
+ The model was trained on the **Tesslate/Rust_Dataset**, which contains:
93
+ - Rust source code from various projects
94
+ - Code documentation and comments
95
+ - Rust programming examples and tutorials
96
+ - Community-contributed Rust code snippets
97
+
98
+ ## Performance
99
+
100
+ The model demonstrates strong performance in:
101
+ - Generating syntactically correct Rust code
102
+ - Understanding Rust-specific concepts (ownership, borrowing, lifetimes)
103
+ - Providing contextually appropriate code completions
104
+ - Explaining Rust programming patterns
105
+
106
+ ## Limitations
107
+
108
+ - **Domain Specificity**: Optimized for Rust code; may not perform well on other programming languages
109
+ - **Model Size**: Being a "tiny" model, it may have limitations with very complex code generation tasks
110
+ - **Context Length**: Limited context window may affect performance on very long code sequences
111
+ - **Specialized Knowledge**: May not have extensive knowledge of very recent Rust features or niche crates
112
+
113
+ ## Ethical Considerations
114
+
115
+ - The model generates code based on training data patterns and may reproduce coding practices from the dataset
116
+ - Users should review and test generated code before using in production environments
117
+ - The model should not be used as a substitute for understanding fundamental programming concepts
118
+
119
+ ## License
120
+
121
+ [Specify license - e.g., MIT, Apache 2.0, etc.]
122
+
123
+ ## Citation
124
+
125
+ ```bibtex
126
+ @misc{tiny-or1-rust,
127
+ title={Tiny-OR1-Rust: A Lightweight Rust Code Assistant Based on Qwen3},
128
+ author={Daemontatox},
129
+ year={2024},
130
+ howpublished={\url{https://huggingface.co/Daemontatox/Tiny-OR1-Rust}},
131
+ note={Fine-tuned from Qwen3-1.7B on Tesslate/Rust_Dataset}
132
+ }
133
+ ```
134
+
135
+ ## Contact
136
+
137
+ For questions, issues, or contributions, please contact [your contact information or GitHub profile].
138
+
139
+ ## Acknowledgments
140
+
141
+ - Thanks to the Tesslate team for providing the Rust dataset
142
+ - Built upon the excellent Qwen3-1.7B foundation model by Alibaba Cloud
143
+ - Special recognition to the Rust community for their contributions to open-source Rust code
144
+
145
+ ---
146
+
147
+ *This model is part of ongoing efforts to make Rust programming more accessible through AI assistance.*