Fine-tune LLMs from one YAML. Layer streaming trains an 8B model on a 4 GB laptop GPU.
Python cliconsumer-gpudpofine-tuningggufhuggingfacellmllmopslocal-ailocal-llmloralow-vrammachine-learningollamapeftpythonpytorchqlorasfttransformers
{
"outcome": "ok",
"error": "",
"free_vram_start": 7353663488,
"total_vram": 8518041600,
"peak_allocated": 2943784960,
"peak_reserved": 3244294144,
"num_alloc_retries": 0,
"num_ooms": 0,
"store": {
"n_layers": 48,
"buffers": 2,
"buffer_bytes": 1841192248,
"large_buffer_bytes": 1557135360,
"store_bytes": 9931636032,
"pinned": true,
"pinned_bytes": 10737418240,
"tier": "ram",
"read_ahead": null,
"disk_bytes": 0,
"layer_loads": 0,
"large_loads": 0,
"device": "cuda",
"total_params": 14770033664
},
"large_keys": [
"lm_head.weight",
"model.embed_tokens.weight"
],
"resident_top": [
[
"base_model.model.model.layers.0.inner.self_attn.q_proj.lora_A.default.weight",
327680
],
[
"base_model.model.model.layers.0.inner.self_attn.q_proj.lora_B.default.weight",
327680
],
[
"base_model.model.model.layers.0.inner.self_attn.v_proj.lora_A.default.weight",
327680
],
[
"base_model.model.model.layers.1.inner.self_attn.q_proj.lora_A.default.weight",
327680
],
[
"base_model.model.model.layers.1.inner.self_attn.q_proj.lora_B.default.weight",
327680
],
[
"base_model.model.model.layers.1.inner.self_attn.v_proj.lora_A.default.weight",
327680
],
[
"base_model.model.model.layers.2.inner.self_attn.q_proj.lora_A.default.weight",
327680
],
[
"base_model.model.model.layers.2.inner.self_attn.q_proj.lora_B.default.weight",
327680
],
[
"base_model.model.model.layers.2.inner.self_attn.v_proj.lora_A.default.weight",
327680
],
[
"base_model.model.model.layers.3.inner.self_attn.q_proj.lora_A.default.weight",
327680
],
[
"base_model.model.model.layers.3.inner.self_attn.q_proj.lora_B.default.weight",
327680
],
[
"base_model.model.model.layers.3.inner.self_attn.v_proj.lora_A.default.weight",
327680
]
],
"resident_total": 50342400,
"log": [
{
"tag": "before step",
"allocated": 1895924224,
"max_allocated": 1895924224,
"reserved": 1897922560,
"t": 32.09585050001624
},
{
"tag": "embed fwd out",
"allocated": 1899856384,
"max_allocated": 1899856384,
"reserved": 1918894080,
"t": 32.238130300014745
},
{
"tag": "L0 fwd out",
"allocated": 1937542656,
"max_allocated": 2105314816,
"reserved": 2204106752,
"t": 37.66395190000185
},
{
"tag": "L12 fwd out",
"allocated": 1984728576,
"max_allocated": 2152500736,
"reserved": 2204106752,
"t": 37.816967799997656
},
{
"tag": "L24 fwd out",
"allocated": 2031914496,
"max_allocated": 2199686656,
"reserved": 2346713088,
"t": 37.96177580000949
},
{
"tag": "L36 fwd out",
"allocated": 2079100416,
"max_allocated": 2246872576,
"reserved": 2346713088,
"t": 38.113848600012716
},
{
"tag": "L47 fwd out",
"allocated": 2122354176,
"max_allocated": 2290126336,
"reserved": 2346713088,
"t": 38.33112479999545
},
{
"tag": "lm_head fwd out",
"allocated": 2247005184,
"max_allocated": 2290126336,
"reserved": 2346713088,
"t": 38.3836261999968
},
{
"tag": "after forward (loss)",
"allocated": 2476647936,
"max_allocated": 2714150400,
"reserved": 2816475136,
"t": 38.55923010001425
},
{
"tag": "lm_head bwd start",
"allocated": 2359859200,
"max_allocated": 2943784960,
"reserved": 3051356160,
"t": 38.59166100001312
},
{
"tag": "L47 bwd start",
"allocated": 2272694784,
"max_allocated": 2943784960,
"reserved": 3051356160,
"t": 38.84132330000284
},
{
"tag": "L36 bwd start",
"allocated": 2240975360,
"max_allocated": 2943784960,
"reserved": 3204448256,
"t": 39.08579010001267
},
{
"tag": "L24 bwd start",
"allocated": 2206372352,
"max_allocated": 2943784960,
"reserved": 3217031168,
"t": 39.32344189999276
},
{
"tag": "L12 bwd start",
"allocated": 2171769344,
"max_allocated": 2943784960,
"reserved": 3229614080,
"t": 39.58417839999311
},
{
"tag": "L0 bwd start",
"allocated": 2137166336,
"max_allocated": 2943784960,
"reserved": 3242196992,
"t": 39.84490610001376
},
{
"tag": "after backward",
"allocated": 2130150400,
"max_allocated": 2943784960,
"reserved": 3244294144,
"t": 39.89140059999772
}
],
"args": {
"weights": "D:/synth/qwen2.5-14b-shape",
"quant": "nf4",
"tier": "ram",
"buffers": 2,
"read_ahead": 2,
"no_pin": false,
"seed": 3,
"lora_r": 16,
"lora_targets": "q_proj,v_proj",
"seq": 384,
"batch": 1,
"layers": "0,12,24,36,47",
"no_history": false,
"out": "benchmarks/results/probe-rtx5070/issue901_14b_seq384_pinned_arenas_final.json"
},
"driver": "benchmarks/harness/issue901_stream_step_probe.py",
"started": "2026-09-15T13:48:12",
"live_top": [
[
1558183936,
[]
],
[
35651584,
[]
],
[
35651584,
[]
],
[
35651584,
[]
],
[
35651584,
[]
],
[
35651584,
[]
],
[
35651584,
[]
],
[
33554432,
[
"modeling_qwen2.py:97 forward",
"modeling_rope_utils.py:128 wrapper",
"modeling_qwen2.py:385 forward",
"output_capturing.py:286 wrapper"
]
],
[
33554432,
[]
],
[
13107200,
[]
],
[
13107200,
[]
],
[
13107200,
[]
],
[
13107200,
[]
],
[
2621440,
[]
],
[
2621440,
[]
],
[
2621440,
[]
],
[
2621440,
[]
],
[
1572864,
[]
],
[
1572864,
[]
],
[
1515520,
[]
],
[
1515520,
[]
],
[
1105920,
[]
],
[
1105920,
[]
],
[
409600,
[]
],
[
409600,
[]
],
[
409600,
[]
],
[
409600,
[]
],
[
327680,
[]
],
[
327680,
[]
],
[
327680,
[]
],
[
327680,
[]
],
[
327680,
[]
],
[
327680,
[]
],
[
327680,
[]
],
[
327680,
[]
],
[
327680,
[]
],
[
327680,
[]
],
[
327680,
[]
],
[
327680,
[]
],
[
327680,
[]
]
]
}