Downloads · 30 days
0
simon-pltk/codi-gpt2-prontoqa-latent
codi-gpt2-prontoqa-latent is a machine learning model from simon-pltk. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for pytorch. The card lists the license as mit.
A CODI (Chain-of-thought Distillation) model trained on ProntoQA for latent chain-of-thought reasoning. The model wraps GPT-2 with LoRA adapters and a distillation objective that compresses explicit chain-of-thought s…
Downloads · 30 days
0
Access
Public
Updated Mar 19, 2026
Repo size
329 MB
Likes
0
Public
Click a slice to open those files.
.bin329 MB · 99%
From the Hugging Face model README
A CODI (Chain-of-thought Distillation) model trained on ProntoQA for latent chain-of-thought reasoning. The model wraps GPT-2 with LoRA adapters and a distillation objective that compresses explicit chain-of-thought steps into latent embeddings.
pip install transformers peft huggingface_hub torch
from huggingface_hub import snapshot_download
import sys
# Download the model
local_dir = snapshot_download("simon-pltk/codi-gpt2-prontoqa-latent")
# Load it
sys.path.insert(0, local_dir)
from load_model import load_codi_model
model = load_codi_model(local_dir, device="cuda")
CODI is a custom torch.nn.Module that:
AutoModelForCausalLM| Parameter | Value |
|---|---|
| Base model | GPT-2 (124M) |
| Dataset | ProntoQA |
| Epochs | 50 |
| Learning rate | 0.003 |
| Seed | 11 |
| Num latent tokens | 5 |
| LoRA rank | 128 |
| Distill loss | SmoothL1 |
| Metric | Start | End |
|---|---|---|
| CE Loss | 6.6610 | 0.1202 |
| Distill Loss | 0.2742 | 0.0759 |
| Ref CE Loss | 1.5432 | 0.0113 |
| Total Loss | 8.4784 | 0.1931 |
| File | Description |
|---|---|
pytorch_model.bin | Full CODI state dict (base model + LoRA + projection) |
model.py | CODI class definition and dataclass configs |
load_model.py | Entrypoint — helper to reconstruct and load the model |
codi_config.json | Model metadata and training hyperparameters |
training_args.bin | Original HuggingFace TrainingArguments |