Instructions to use Gabriel2502/llama-3.2-1b-latent-sft-stage2_v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Gabriel2502/llama-3.2-1b-latent-sft-stage2_v2 with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
LatentSFT Stage 2 โ llama-3.2-1b-latent-sft-stage2_v2
Model ini adalah hasil fine-tuning meta-llama/Llama-3.2-1B-Instruct menggunakan metode Latent SFT Stage 2 dengan LoRA (Low-Rank Adaptation).
Konfigurasi Training
| Parameter | Nilai |
|---|---|
| Base Model | meta-llama/Llama-3.2-1B-Instruct |
| LoRA Rank | 32 |
| LoRA Dropout | 0.1 |
| Compression Rate | 4 |
| Epochs | 20 |
| Batch Size | 1 |
| Gradient Accumulation | 4 |
| Learning Rate | 0.0001 |
| Max Seq Len | 1024 |
| CE Weight | 1.0 |
| KL Weight | 0.5 |
| FP16 | True |
Cara Load Model
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.2-1B-Instruct")
tokenizer = AutoTokenizer.from_pretrained("Gabriel2502/llama-3.2-1b-latent-sft-stage2_v2")
model = PeftModel.from_pretrained(base_model, "Gabriel2502/llama-3.2-1b-latent-sft-stage2_v2")
model = model.merge_and_unload() # Opsional: merge LoRA ke base model
Deskripsi Metode
Model ini dilatih menggunakan pendekatan Latent Compression:
- Jawaban (response) dikompresi menjadi latent token menggunakan rata-rata distribusi token
- Model belajar memprediksi jawaban dari representasi latent yang terkompresi
- Loss gabungan: CE Loss (pada token jawaban) + KL Loss (distilasi distribusi latent)
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support
Model tree for Gabriel2502/llama-3.2-1b-latent-sft-stage2_v2
Base model
meta-llama/Llama-3.2-1B-Instruct