Instructions to use MainStack/marvy-1-14B-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use MainStack/marvy-1-14B-lora with PEFT:
Task type is invalid.
- MLX
How to use MainStack/marvy-1-14B-lora with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("MainStack/marvy-1-14B-lora") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use MainStack/marvy-1-14B-lora with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "MainStack/marvy-1-14B-lora" --prompt "Once upon a time"
File size: 1,363 Bytes
703a676 | 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 | {
"adapter_path": "train/adapters",
"batch_size": 1,
"clear_cache_threshold": 0,
"config": "train/lora_config.yaml",
"data": "train/data",
"fine_tune_type": "lora",
"grad_accumulation_steps": 16,
"grad_checkpoint": true,
"iters": 350,
"learning_rate": 0.0001,
"lora_parameters": {
"rank": 32,
"scale": 20.0,
"dropout": 0.0,
"keys": [
"self_attn.q_proj",
"self_attn.k_proj",
"self_attn.v_proj",
"self_attn.o_proj",
"mlp.gate_proj",
"mlp.up_proj",
"mlp.down_proj"
]
},
"lr_schedule": {
"name": "cosine_decay",
"warmup": 20,
"arguments": [
0.0001,
350,
1e-06
]
},
"mask_prompt": true,
"max_seq_length": 8192,
"model": "mlx-community/Qwen2.5-14B-Instruct-4bit",
"num_layers": 16,
"optimizer": "adamw",
"optimizer_config": {
"adam": {},
"adamw": {},
"muon": {},
"sgd": {},
"adafactor": {}
},
"project_name": null,
"report_to": null,
"resume_adapter_file": null,
"save_every": 50,
"seed": 42,
"steps_per_eval": 50,
"steps_per_report": 10,
"test": false,
"test_batches": 500,
"train": true,
"val_batches": 25
} |