Upload folder using huggingface_hub
Browse files- README.md +1 -70
- adapter_config.json +35 -38
README.md
CHANGED
|
@@ -16,10 +16,7 @@ datasets:
|
|
| 16 |
library_name: mlx-lm
|
| 17 |
pipeline_tag: text-generation
|
| 18 |
---
|
| 19 |
-
**Developed By Samiya Kashif, Kashif Salahuddin & Rohan Bhangale
|
| 20 |
-
|
| 21 |
-
https://huggingface.co/blog/salakash/minimalism
|
| 22 |
-
|
| 23 |
## 1. Executive Summary
|
| 24 |
|
| 25 |
**Minimalism** is a specialized coding assistant built as a LoRA (Low-Rank Adaptation) adapter for the Qwen2.5-Coder-0.5B-Instruct base model. Unlike generic coding assistants, Minimalism implements a "runnable-first" philosophy: when users request code, responses are structured with clear **Solution**, **Usage**, and **Sanity test** sections, ensuring developers receive immediately executable code with minimal friction.
|
|
@@ -82,72 +79,6 @@ Developers need coding assistance that:
|
|
| 82 |
- **Educators** teaching programming with consistent code examples
|
| 83 |
- **Researchers** experimenting with LoRA fine-tuning on MLX
|
| 84 |
|
| 85 |
-
# System Architecture
|
| 86 |
-
|
| 87 |
-
### High-Level Architecture
|
| 88 |
-
|
| 89 |
-
```
|
| 90 |
-
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 91 |
-
β Minimalism System β
|
| 92 |
-
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
|
| 93 |
-
β β
|
| 94 |
-
β ββββββββββββββββ ββββββββββββββββ ββββββββββββ β
|
| 95 |
-
β β Data β β Training β β Serving β β
|
| 96 |
-
β β Pipeline βββββββΆβ Pipeline βββββββΆβ Layer β β
|
| 97 |
-
β ββββββββββββββββ ββββββββββββββββ ββββββββββββ β
|
| 98 |
-
β β β β β
|
| 99 |
-
β βΌ βΌ βΌ β
|
| 100 |
-
β ββββββββββββββββ ββββββββββββββββ ββββββββββββ β
|
| 101 |
-
β β Dataset β β LoRA β β MLX β β
|
| 102 |
-
β β Processing β β Adapter β β Server β β
|
| 103 |
-
β ββββββββββββββββ ββββββββββββββββ ββββββββββββ β
|
| 104 |
-
β β
|
| 105 |
-
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 106 |
-
```
|
| 107 |
-
|
| 108 |
-
## Technical Architecture
|
| 109 |
-
|
| 110 |
-
### Method 1 Pipeline (9 Steps)
|
| 111 |
-
|
| 112 |
-
```
|
| 113 |
-
1. Receive Request
|
| 114 |
-
β
|
| 115 |
-
2. Derive Requirements + Tests
|
| 116 |
-
β
|
| 117 |
-
3. Generate N Candidates
|
| 118 |
-
β
|
| 119 |
-
4. Normalize Code
|
| 120 |
-
β
|
| 121 |
-
5. Score by LoC
|
| 122 |
-
β
|
| 123 |
-
6. Apply Quality Gates (G1-G5)
|
| 124 |
-
β
|
| 125 |
-
7. Select Minimal Passing
|
| 126 |
-
β
|
| 127 |
-
8. Optional Reduction Loop
|
| 128 |
-
β
|
| 129 |
-
9. Output + Audit
|
| 130 |
-
```
|
| 131 |
-
|
| 132 |
-
### Quality Gates
|
| 133 |
-
|
| 134 |
-
- **G1 Compile**: Python syntax validation
|
| 135 |
-
- **G2 Constraints**: Dependency checking
|
| 136 |
-
- **G3 Execution**: Sandbox smoke test (2s timeout)
|
| 137 |
-
- **G4 Tests**: Acceptance test validation
|
| 138 |
-
- **G5 Safety**: Dangerous operation detection
|
| 139 |
-
|
| 140 |
-

|
| 141 |
-
|
| 142 |
-
### Key Design Principles
|
| 143 |
-
|
| 144 |
-
1. **Text-based analysis** (no AST as required)
|
| 145 |
-
2. **Fail-fast validation** (stop on first gate failure)
|
| 146 |
-
3. **Sandbox isolation** (subprocess with timeout)
|
| 147 |
-
4. **Complete audit trail** (every decision logged)
|
| 148 |
-
5. **Pluggable architecture** (easy to extend)
|
| 149 |
-
|
| 150 |
-
|
| 151 |
|
| 152 |
|
| 153 |
## Quick Start
|
|
|
|
| 16 |
library_name: mlx-lm
|
| 17 |
pipeline_tag: text-generation
|
| 18 |
---
|
| 19 |
+
**Developed By Samiya Kashif, Kashif Salahuddin & Rohan Bhangale**
|
|
|
|
|
|
|
|
|
|
| 20 |
## 1. Executive Summary
|
| 21 |
|
| 22 |
**Minimalism** is a specialized coding assistant built as a LoRA (Low-Rank Adaptation) adapter for the Qwen2.5-Coder-0.5B-Instruct base model. Unlike generic coding assistants, Minimalism implements a "runnable-first" philosophy: when users request code, responses are structured with clear **Solution**, **Usage**, and **Sanity test** sections, ensuring developers receive immediately executable code with minimal friction.
|
|
|
|
| 79 |
- **Educators** teaching programming with consistent code examples
|
| 80 |
- **Researchers** experimenting with LoRA fine-tuning on MLX
|
| 81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
|
| 83 |
|
| 84 |
## Quick Start
|
adapter_config.json
CHANGED
|
@@ -1,40 +1,37 @@
|
|
| 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 |
-
"test_batches": 500,
|
| 38 |
-
"train": true,
|
| 39 |
-
"val_batches": 25
|
| 40 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"batch_size": 4,
|
| 3 |
+
"config": null,
|
| 4 |
+
"fine_tune_type": "lora",
|
| 5 |
+
"grad_accumulation_steps": 1,
|
| 6 |
+
"grad_checkpoint": false,
|
| 7 |
+
"iters": 100,
|
| 8 |
+
"learning_rate": 2e-05,
|
| 9 |
+
"lora_parameters": {
|
| 10 |
+
"rank": 8,
|
| 11 |
+
"dropout": 0.0,
|
| 12 |
+
"scale": 20.0
|
| 13 |
+
},
|
| 14 |
+
"lr_schedule": null,
|
| 15 |
+
"mask_prompt": false,
|
| 16 |
+
"max_seq_length": 2048,
|
| 17 |
+
"model": "mlx-community/Qwen2.5-Coder-0.5B-Instruct-4bit",
|
| 18 |
+
"num_layers": 16,
|
| 19 |
+
"optimizer": "adam",
|
| 20 |
+
"optimizer_config": {
|
| 21 |
+
"adam": {},
|
| 22 |
+
"adamw": {},
|
| 23 |
+
"muon": {},
|
| 24 |
+
"sgd": {},
|
| 25 |
+
"adafactor": {}
|
| 26 |
+
},
|
| 27 |
+
"project_name": null,
|
| 28 |
+
"report_to": null,
|
| 29 |
+
"save_every": 100,
|
| 30 |
+
"seed": 0,
|
| 31 |
+
"steps_per_eval": 200,
|
| 32 |
+
"steps_per_report": 10,
|
| 33 |
+
"test": false,
|
| 34 |
+
"test_batches": 500,
|
| 35 |
+
"train": true,
|
| 36 |
+
"val_batches": 25
|
|
|
|
|
|
|
|
|
|
| 37 |
}
|