QuillBytes commited on
Commit
e936bdd
·
verified ·
1 Parent(s): 2084585

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +83 -0
README.md ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ tags:
6
+ - text-generation-inference
7
+ - transformers
8
+ - gguf
9
+ - ollama
10
+ - qwen3
11
+ - python-coding
12
+ base_model: Qwen/Qwen3-4B-Instruct-2507
13
+ pipeline_tag: text-generation
14
+ ---
15
+
16
+ # Truss Python: Qwen3-4B Specialized Coding Assistant
17
+
18
+ **Truss Python** is a specialized fine-tuned version of **Qwen3-4B-Instruct-2507**, optimized for generating clean, professional, and robust Python code. By focusing on high-quality seed prompts involving standard libraries, asynchronous programming, and data structures, this model prioritizes type safety, documentation, and modern Pythonic patterns.
19
+
20
+ ## 🚀 Model Details
21
+
22
+ * **Base Model:** [Qwen/Qwen3-4B-Instruct-2507](https://huggingface.co/Qwen/Qwen3-4B-Instruct-2507)
23
+ * **Architecture:** Qwen3ForCausalLM
24
+ * **Fine-Tuning Method:** LoRA (Low-Rank Adaptation)
25
+ * **Quantization:** Q4_K_M (GGUF)
26
+ * **File Size:** ~2.5 GB
27
+ * **License:** Apache 2.0 (Inherited from Qwen3)
28
+
29
+ ## ✨ Key Features
30
+
31
+ * **Professional Structure:** Consistently generates code with Google-style docstrings and comprehensive type hints.
32
+ * **Modern Syntax:** Proficient in Python 3.10+ features like `match-case` structural pattern matching.
33
+ * **Robust Error Handling:** Prioritizes `try/except` blocks and resource management (e.g., `async with`, `contextlib`).
34
+ * **Standard Library Focus:** Expert-level knowledge of `asyncio`, `threading`, `csv`, `functools`, and `pandas`.
35
+
36
+ ## 💻 Usage with Ollama
37
+
38
+ This model is optimized for local deployment using **Ollama**.
39
+
40
+ ### 1. Local Import (Using GGUF)
41
+ If you have downloaded the `.gguf` file:
42
+
43
+ 1. Create a `Modelfile`:
44
+ ```dockerfile
45
+ FROM ./truss-qwen3-python-lora.gguf
46
+ PARAMETER temperature 0.2
47
+ SYSTEM "You are an expert Python developer. Provide clean, efficient, and well-documented code."
48
+ ```
49
+ 2. Create the model in your terminal:
50
+ ```bash
51
+ ollama create truss-python -f Modelfile
52
+ ```
53
+ 3. Run the model:
54
+ ```bash
55
+ ollama run truss-python
56
+ ```
57
+
58
+ ## 🧪 Example Prompts
59
+
60
+ | Task | Prompt |
61
+ | :--- | :--- |
62
+ | **Algorithms** | "Write a binary search function with type hints and no built-in libraries." |
63
+ | **Decorators** | "Create a `@timer` decorator using `functools.wraps` and `time.perf_counter`." |
64
+ | **Async I/O** | "Fetch data from 3 URLs concurrently using `aiohttp` and `asyncio.gather`." |
65
+ | **Data Science** | "Optimize a pandas merge for 1M+ rows using specific dtypes." |
66
+
67
+ ## ⚙️ Technical Specifications
68
+
69
+ | Parameter | Value |
70
+ | :--- | :--- |
71
+ | **Parameters** | 4 Billion |
72
+ | **Context Length** | 262,144 tokens |
73
+ | **Embedding Dim** | 2,560 |
74
+ | **Head Count** | 32 (Q), 8 (KV) |
75
+ | **RoPE Theta** | 5,000,000 |
76
+
77
+ ## 📜 License
78
+
79
+ This model is based on Qwen3, which is licensed under the **Apache 2.0 License**. The fine-tuned weights and GGUF conversion are provided for research and development purposes.
80
+
81
+ ---
82
+
83
+ *Built with ❤️ using Unsloth, llama.cpp, and Ollama.*