Instructions to use Jeesup/llama32-3B-rte-nf4-lora-seed42 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Jeesup/llama32-3B-rte-nf4-lora-seed42 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.2-3B") model = PeftModel.from_pretrained(base_model, "Jeesup/llama32-3B-rte-nf4-lora-seed42") - Notebooks
- Google Colab
- Kaggle
File size: 1,672 Bytes
fbacde8 | 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 67 68 69 70 | ---
library_name: peft
base_model: meta-llama/Llama-3.2-3B
tags:
- lora
- peft
- quantization
- glue
- rte
---
# llama32-3B-rte-nf4-lora-seed42
LoRA adapter trained on GLUE **RTE** on top of a
**nf4** backbone of `meta-llama/Llama-3.2-3B`.
Part of a controlled study of whether the backbone bit-width changes what a LoRA
adapter learns. For a given (model size, seed) the adapter initialisation is
**identical** across the bf16 / int8 / nf4 arms, and the data order, optimiser,
schedule and LoRA hyperparameters are held fixed — so any difference in the
learned update is attributable to the backbone.
## Result
| metric | validation | test |
|---|---|---|
| accuracy | 0.8353 | 0.8412 |
| macro-F1 | 0.8351 | 0.8396 |
| loss | 0.3492 | 0.4308 |
Test-set majority-class baseline: 0.5271
- peak GPU memory: 5.51 GiB
- training time: 6.4 min (105 steps)
- GPU: NVIDIA GeForce RTX 4090
## Setup
- seed: `42` · adapter init: `shared:lora_init_3B_seed42.pt:224tensors`
- LoRA: r=16, alpha=32, dropout=0.0, bias=none,
target_modules=['q_proj', 'k_proj', 'v_proj', 'o_proj']
- trainable params: 9,175,040
- epochs 3, lr 0.0002,
max_len 256, batch 4
x grad_accum 16,
cosine schedule, warmup 0.03
## Prompt format
Trained as causal LM with the loss on the answer letter only (prompt tokens
masked to -100):
```
Premise: ...
Hypothesis: ...
Does the premise entail the hypothesis?
A. Entailment
B. Not entailment
Answer:
```
Evaluated by conditional likelihood over the answer letters
(Entailment, Not entailment).
> GLUE `test` is unlabeled, so the official `validation` split is used as TEST
> and the validation set is carved from `train` (disjoint).
|