salakash commited on
Commit
03a2e07
Β·
verified Β·
1 Parent(s): 369828c

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. README.md +1 -70
  2. 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 & Robert Rojek**
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
- ![image](https://cdn-uploads.huggingface.co/production/uploads/6903f5738b82cf1035f9a011/l9sRbieUQyxzWY4ekMyYJ.png)
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
- "adapter_path": "outputs/adapters/dev",
3
- "batch_size": 4,
4
- "config": null,
5
- "data": "data/training_ready",
6
- "fine_tune_type": "lora",
7
- "grad_accumulation_steps": 1,
8
- "grad_checkpoint": false,
9
- "iters": 100,
10
- "learning_rate": 2e-05,
11
- "lora_parameters": {
12
- "rank": 8,
13
- "dropout": 0.0,
14
- "scale": 20.0
15
- },
16
- "lr_schedule": null,
17
- "mask_prompt": false,
18
- "max_seq_length": 2048,
19
- "model": "mlx-community/Qwen2.5-Coder-0.5B-Instruct-4bit",
20
- "num_layers": 16,
21
- "optimizer": "adam",
22
- "optimizer_config": {
23
- "adam": {},
24
- "adamw": {},
25
- "muon": {},
26
- "sgd": {},
27
- "adafactor": {}
28
- },
29
- "project_name": null,
30
- "report_to": null,
31
- "resume_adapter_file": null,
32
- "save_every": 100,
33
- "seed": 0,
34
- "steps_per_eval": 200,
35
- "steps_per_report": 10,
36
- "test": false,
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
  }