File size: 1,733 Bytes
cf7eecf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
base_model: Qwen/Qwen3-4B-Instruct-2507
library_name: mlx
tags:
  - lora
  - mlx
  - trip-optimizer
  - travel
  - mutation
license: apache-2.0
---

# trip-optimizer-mutator

MLX LoRA adapter for **Qwen3-4B-Instruct-2507** that generates targeted, structured
itinerary mutations for [trip-optimizer](https://github.com/michaelpersonal/trip-optimizer).

## Task

Given a trip profile, current plan, optimization goal, and constraints, the model
outputs a scoped RFC 6902 JSON Patch proposal — one change at a time.
trip-optimizer applies the patch deterministically and validates the result.

Input task field: `mutate_plan`

Supported mutation types: `swap_activity`, `upgrade_meal`, `reorder_day`,
`simplify_day`, `time_adjust`, `clarify`

## Usage with mlx-lm

```bash
pip install mlx-lm
```

```python
from mlx_lm import load, generate

model, tokenizer = load(
    "Qwen/Qwen3-4B-Instruct-2507",
    adapter_path="esc511/trip-optimizer-mutator",
)
```

## Usage with trip-optimizer

```bash
# After installing trip-optimizer
trip-optimizer setup   # pulls via Ollama
```

## Training details

- **Base model:** Qwen/Qwen3-4B-Instruct-2507
- **Method:** MLX LoRA (r=8, alpha=20, dropout=0)
- **Layers:** 32
- **Training iters:** 600
- **Max sequence length:** 8192
- **Hardware:** Apple M5 Max 128 GB
- **Checkpoint:** v2 (trip-mutator-4b-v0-mlx-r8-v2)

## Input / Output schema

Full schemas at:
- Input: [trip_mutator_input.schema.json](https://github.com/michaelpersonal/trip-optimizer/blob/main/finetuning/mutation/schemas/trip_mutator_input.schema.json)
- Output: [trip_mutator_output.schema.json](https://github.com/michaelpersonal/trip-optimizer/blob/main/finetuning/mutation/schemas/trip_mutator_output.schema.json)