Instructions to use esc511/trip-optimizer-mutator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use esc511/trip-optimizer-mutator with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir trip-optimizer-mutator esc511/trip-optimizer-mutator
- llama-cpp-python
How to use esc511/trip-optimizer-mutator with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="esc511/trip-optimizer-mutator", filename="trip-mutator-q4km.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use esc511/trip-optimizer-mutator with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf esc511/trip-optimizer-mutator # Run inference directly in the terminal: llama-cli -hf esc511/trip-optimizer-mutator
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf esc511/trip-optimizer-mutator # Run inference directly in the terminal: llama-cli -hf esc511/trip-optimizer-mutator
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf esc511/trip-optimizer-mutator # Run inference directly in the terminal: ./llama-cli -hf esc511/trip-optimizer-mutator
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf esc511/trip-optimizer-mutator # Run inference directly in the terminal: ./build/bin/llama-cli -hf esc511/trip-optimizer-mutator
Use Docker
docker model run hf.co/esc511/trip-optimizer-mutator
- LM Studio
- Jan
- Ollama
How to use esc511/trip-optimizer-mutator with Ollama:
ollama run hf.co/esc511/trip-optimizer-mutator
- Unsloth Studio new
How to use esc511/trip-optimizer-mutator with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for esc511/trip-optimizer-mutator to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for esc511/trip-optimizer-mutator to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for esc511/trip-optimizer-mutator to start chatting
- Pi new
How to use esc511/trip-optimizer-mutator with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "esc511/trip-optimizer-mutator"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "esc511/trip-optimizer-mutator" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use esc511/trip-optimizer-mutator with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "esc511/trip-optimizer-mutator"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default esc511/trip-optimizer-mutator
Run Hermes
hermes
- Docker Model Runner
How to use esc511/trip-optimizer-mutator with Docker Model Runner:
docker model run hf.co/esc511/trip-optimizer-mutator
- Lemonade
How to use esc511/trip-optimizer-mutator with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull esc511/trip-optimizer-mutator
Run and chat with the model
lemonade run user.trip-optimizer-mutator-{{QUANT_TAG}}List all available models
lemonade list
Upload folder using huggingface_hub
Browse files- 0000200_adapters.safetensors +3 -0
- 0000400_adapters.safetensors +3 -0
- 0000600_adapters.safetensors +3 -0
- README.md +65 -0
- adapter_config.json +41 -0
- adapters.safetensors +3 -0
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
|