Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,22 +1,40 @@
|
|
| 1 |
-
---
|
| 2 |
-
base_model: unsloth/Llama-3.2-1B-Instruct
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
--
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
``
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: unsloth/Llama-3.2-1B-Instruct
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
license: llama3.2
|
| 6 |
+
library_name: colar
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
+
tags:
|
| 9 |
+
- latent-reasoning
|
| 10 |
+
- colar
|
| 11 |
+
- reasoning
|
| 12 |
+
- research
|
| 13 |
+
---
|
| 14 |
+
# CoLaR — Coding (symbolic-execution reasoning), Llama-3.2-1B
|
| 15 |
+
|
| 16 |
+
A **CoLaR** (Compressed Latent Reasoning) checkpoint for **Coding (symbolic-execution style reasoning)**, fine-tuned from `unsloth/Llama-3.2-1B-Instruct`. The model reasons in *compressed continuous latent embeddings* rather than explicit chain-of-thought tokens.
|
| 17 |
+
|
| 18 |
+
## Model
|
| 19 |
+
- **Base model:** `unsloth/Llama-3.2-1B-Instruct`
|
| 20 |
+
- **Framework:** CoLaR — *Think Silently, Think Fast: Dynamic Latent Compression of LLM Reasoning Chains* (arXiv:2505.16552).
|
| 21 |
+
- **Domain:** Coding (symbolic-execution style reasoning)
|
| 22 |
+
- **Warm-start:** colar-gsm (GSM8K CoLaR base)
|
| 23 |
+
- **Files:** `colar_coding.ckpt`, `hparams.yaml`
|
| 24 |
+
|
| 25 |
+
## Training procedure
|
| 26 |
+
Trained with the CoLaR supervised fine-tuning (SFT) recipe: the frozen base LLM is adapted with **q/v LoRA (rank 128, alpha 32)** plus a trainable **Latent Head** (3-layer MLP) and an **embedding-compression** module. The objective is next-token **cross-entropy** on the answer plus an **`embed_modeling_loss` (MSE)** that reconstructs the compressed reasoning-step embeddings (each latent token summarizes about `compression_factor` chain-of-thought tokens). Reinforcement learning (GRPO) is **disabled** — this is an SFT-only checkpoint.
|
| 27 |
+
- **This checkpoint:** CoLaR SFT, compression factor 5, warm-started from colar-gsm; SFT only (RL off).
|
| 28 |
+
|
| 29 |
+
## Datasets
|
| 30 |
+
- Coding reasoning mix (symbolic-execution style)
|
| 31 |
+
|
| 32 |
+
## How to load
|
| 33 |
+
This is a **PyTorch-Lightning checkpoint** (weights under the top-level key `state_dict`) that fits the CoLaR scaffold — it is **not** directly `AutoModel`-loadable. Load the base model, splice this `state_dict` in with `strict=False`, and use the CoLaR runtime settings:
|
| 34 |
+
```
|
| 35 |
+
COLAR_EMB_STD=0.018 COLAR_COMPRESS=<compression_factor> sep_token=###
|
| 36 |
+
TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD=1
|
| 37 |
+
```
|
| 38 |
+
See the CoLaR repository (github.com/xiaomi-research/colar) for the exact loader. The shared GSM8K warm-start ancestor is the official `AlbertTan/CoLaR` release.
|
| 39 |
+
|
| 40 |
+
*Research artifact for latent-reasoning study (small 1–1.5B model).*
|