esc511 commited on
Commit
cf7eecf
·
verified ·
1 Parent(s): c611687

Upload folder using huggingface_hub

Browse files
0000200_adapters.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da1ac66cfdb5d3add536b5eba03330a206e9f146ed9470184904a1cab4246de9
3
+ size 58768604
0000400_adapters.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb143cc214885bee6178b0606538aa5ae244c3d862602151b98b88cfed3f5079
3
+ size 58768604
0000600_adapters.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0708a854e8c80ef0800f38b8361d37ddc120bbb2bf62b267b1673add5b0c23d4
3
+ size 58768604
README.md ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Qwen/Qwen3-4B-Instruct-2507
3
+ library_name: mlx
4
+ tags:
5
+ - lora
6
+ - mlx
7
+ - trip-optimizer
8
+ - travel
9
+ - mutation
10
+ license: apache-2.0
11
+ ---
12
+
13
+ # trip-optimizer-mutator
14
+
15
+ MLX LoRA adapter for **Qwen3-4B-Instruct-2507** that generates targeted, structured
16
+ itinerary mutations for [trip-optimizer](https://github.com/michaelpersonal/trip-optimizer).
17
+
18
+ ## Task
19
+
20
+ Given a trip profile, current plan, optimization goal, and constraints, the model
21
+ outputs a scoped RFC 6902 JSON Patch proposal — one change at a time.
22
+ trip-optimizer applies the patch deterministically and validates the result.
23
+
24
+ Input task field: `mutate_plan`
25
+
26
+ Supported mutation types: `swap_activity`, `upgrade_meal`, `reorder_day`,
27
+ `simplify_day`, `time_adjust`, `clarify`
28
+
29
+ ## Usage with mlx-lm
30
+
31
+ ```bash
32
+ pip install mlx-lm
33
+ ```
34
+
35
+ ```python
36
+ from mlx_lm import load, generate
37
+
38
+ model, tokenizer = load(
39
+ "Qwen/Qwen3-4B-Instruct-2507",
40
+ adapter_path="esc511/trip-optimizer-mutator",
41
+ )
42
+ ```
43
+
44
+ ## Usage with trip-optimizer
45
+
46
+ ```bash
47
+ # After installing trip-optimizer
48
+ trip-optimizer setup # pulls via Ollama
49
+ ```
50
+
51
+ ## Training details
52
+
53
+ - **Base model:** Qwen/Qwen3-4B-Instruct-2507
54
+ - **Method:** MLX LoRA (r=8, alpha=20, dropout=0)
55
+ - **Layers:** 32
56
+ - **Training iters:** 600
57
+ - **Max sequence length:** 8192
58
+ - **Hardware:** Apple M5 Max 128 GB
59
+ - **Checkpoint:** v2 (trip-mutator-4b-v0-mlx-r8-v2)
60
+
61
+ ## Input / Output schema
62
+
63
+ Full schemas at:
64
+ - Input: [trip_mutator_input.schema.json](https://github.com/michaelpersonal/trip-optimizer/blob/main/finetuning/mutation/schemas/trip_mutator_input.schema.json)
65
+ - Output: [trip_mutator_output.schema.json](https://github.com/michaelpersonal/trip-optimizer/blob/main/finetuning/mutation/schemas/trip_mutator_output.schema.json)
adapter_config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "adapter_path": "checkpoints/trip-mutator-4b-v0-mlx-r8-v2",
3
+ "batch_size": 1,
4
+ "clear_cache_threshold": 0,
5
+ "config": null,
6
+ "data": "data/train",
7
+ "fine_tune_type": "lora",
8
+ "grad_accumulation_steps": 1,
9
+ "grad_checkpoint": false,
10
+ "iters": 600,
11
+ "learning_rate": 0.0001,
12
+ "lora_parameters": {
13
+ "rank": 8,
14
+ "dropout": 0.0,
15
+ "scale": 20.0
16
+ },
17
+ "lr_schedule": null,
18
+ "mask_prompt": false,
19
+ "max_seq_length": 8192,
20
+ "model": "Qwen/Qwen3-4B-Instruct-2507",
21
+ "num_layers": 32,
22
+ "optimizer": "adam",
23
+ "optimizer_config": {
24
+ "adam": {},
25
+ "adamw": {},
26
+ "muon": {},
27
+ "sgd": {},
28
+ "adafactor": {}
29
+ },
30
+ "project_name": null,
31
+ "report_to": null,
32
+ "resume_adapter_file": null,
33
+ "save_every": 200,
34
+ "seed": 0,
35
+ "steps_per_eval": 200,
36
+ "steps_per_report": 10,
37
+ "test": false,
38
+ "test_batches": 500,
39
+ "train": true,
40
+ "val_batches": 25
41
+ }
adapters.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0708a854e8c80ef0800f38b8361d37ddc120bbb2bf62b267b1673add5b0c23d4
3
+ size 58768604