Feature Extraction
Transformers
Safetensors
Rust
English
qwen3
bnb-my-repo
text-generation-inference
unsloth
code
idiomatic rust
reasoning
text-embeddings-inference
4-bit precision
bitsandbytes
Instructions to use Daemontatox/Tiny-OR1-Rust-bnb-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Daemontatox/Tiny-OR1-Rust-bnb-4bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Daemontatox/Tiny-OR1-Rust-bnb-4bit")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("Daemontatox/Tiny-OR1-Rust-bnb-4bit") model = AutoModelForMultimodalLM.from_pretrained("Daemontatox/Tiny-OR1-Rust-bnb-4bit") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Studio
How to use Daemontatox/Tiny-OR1-Rust-bnb-4bit with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Daemontatox/Tiny-OR1-Rust-bnb-4bit to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Daemontatox/Tiny-OR1-Rust-bnb-4bit to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Daemontatox/Tiny-OR1-Rust-bnb-4bit to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Daemontatox/Tiny-OR1-Rust-bnb-4bit", max_seq_length=2048, )
File size: 5,291 Bytes
788a319 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | ---
base_model:
- Daemontatox/Tiny-OR1-Rust
tags:
- bnb-my-repo
- text-generation-inference
- transformers
- unsloth
- qwen3
- rust
- code
- idiomatic rust
- reasoning
license: apache-2.0
language:
- en
datasets:
- Tesslate/Rust_Dataset
library_name: transformers
---
# Daemontatox/Tiny-OR1-Rust (Quantized)
## Description
This model is a quantized version of the original model [`Daemontatox/Tiny-OR1-Rust`](https://huggingface.co/Daemontatox/Tiny-OR1-Rust).
It's quantized using the BitsAndBytes library to 4-bit using the [bnb-my-repo](https://huggingface.co/spaces/bnb-community/bnb-my-repo) space.
## Quantization Details
- **Quantization Type**: int4
- **bnb_4bit_quant_type**: nf4
- **bnb_4bit_use_double_quant**: True
- **bnb_4bit_compute_dtype**: bfloat16
- **bnb_4bit_quant_storage**: uint8
# 📄 Original Model Information
# Tiny-OR1-Rust
**A lightweight Rust code assistant model for code generation, completion, and explanation.**
## Model Description
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.
## Model Details
- **Model Name**: Tiny-OR1-Rust
- **Developer**: Daemontatox
- **Model Type**: Code Generation / Text-to-Code
- **Language**: Rust
- **Architecture**: Qwen3-based Transformer
- **Parameters**: 1.7B
- **Base Model**: Qwen3-1.7B
- **Training Dataset**: Tesslate/Rust_Dataset
## Intended Use
### Primary Use Cases
- **Code Generation**: Generate Rust code from natural language descriptions
- **Code Completion**: Complete partial Rust code snippets
- **Code Explanation**: Explain Rust code functionality and concepts
- **Learning Assistant**: Help developers learn Rust programming patterns and best practices
### Intended Users
- Rust developers and learners
- Students studying systems programming
- Developers transitioning to Rust from other languages
- Code editors and IDEs integrating Rust assistance
## How to Use
### Basic Usage
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("Daemontatox/Tiny-OR1-Rust")
model = AutoModelForCausalLM.from_pretrained("Daemontatox/Tiny-OR1-Rust")
# Example prompt
prompt = "Write a Rust function to calculate factorial:"
# Generate code
inputs = tokenizer.encode(prompt, return_tensors="pt")
outputs = model.generate(inputs, max_length=150, temperature=0.7, pad_token_id=tokenizer.eos_token_id)
generated_code = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(generated_code)
```
### Prompt Examples
**Code Generation:**
```
"Write a Rust function that reads a file and counts the number of lines:"
"Create a Rust struct for a binary tree with insert and search methods:"
"Implement a thread-safe counter using Arc and Mutex in Rust:"
```
**Code Explanation:**
```
"Explain this Rust code: fn main() { let x = vec![1, 2, 3]; }"
"What does the ? operator do in Rust error handling?"
```
## Training Data
The model was trained on the **Tesslate/Rust_Dataset**, which contains:
- Rust source code from various projects
- Code documentation and comments
- Rust programming examples and tutorials
- Community-contributed Rust code snippets
## Performance
The model demonstrates strong performance in:
- Generating syntactically correct Rust code
- Understanding Rust-specific concepts (ownership, borrowing, lifetimes)
- Providing contextually appropriate code completions
- Explaining Rust programming patterns
## Limitations
- **Domain Specificity**: Optimized for Rust code; may not perform well on other programming languages
- **Model Size**: Being a "tiny" model, it may have limitations with very complex code generation tasks
- **Context Length**: Limited context window may affect performance on very long code sequences
- **Specialized Knowledge**: May not have extensive knowledge of very recent Rust features or niche crates
## Ethical Considerations
- The model generates code based on training data patterns and may reproduce coding practices from the dataset
- Users should review and test generated code before using in production environments
- The model should not be used as a substitute for understanding fundamental programming concepts
## License
[Specify license - e.g., MIT, Apache 2.0, etc.]
## Citation
```bibtex
@misc{tiny-or1-rust,
title={Tiny-OR1-Rust: A Lightweight Rust Code Assistant Based on Qwen3},
author={Daemontatox},
year={2024},
howpublished={\url{https://huggingface.co/Daemontatox/Tiny-OR1-Rust}},
note={Fine-tuned from Qwen3-1.7B on Tesslate/Rust_Dataset}
}
```
## Contact
For questions, issues, or contributions, please contact [your contact information or GitHub profile].
## Acknowledgments
- Thanks to the Tesslate team for providing the Rust dataset
- Built upon the excellent Qwen3-1.7B foundation model by Alibaba Cloud
- Special recognition to the Rust community for their contributions to open-source Rust code
---
*This model is part of ongoing efforts to make Rust programming more accessible through AI assistance.* |