rjz123 commited on
Commit
0ac2f5d
·
verified ·
1 Parent(s): 628c1b4

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +40 -22
README.md CHANGED
@@ -1,22 +1,40 @@
1
- ---
2
- base_model: unsloth/Llama-3.2-1B-Instruct
3
- library_name: peft
4
- pipeline_tag: text-generation
5
- tags:
6
- - latent-reasoning
7
- - colar
8
- - research
9
- ---
10
- # colar-physics-l1b
11
-
12
- single-track CoLaR, physics 域(关系选择/physics_mix), warm-start 自 colar-gsm, compress=5
13
-
14
- - **Base model:** `unsloth/Llama-3.2-1B-Instruct`
15
- - **Files:** `colar_physics.ckpt`, `hparams.yaml`
16
-
17
- ## Loading (PyTorch-Lightning checkpoint — NOT AutoModel-loadable)
18
- Weights live under the top-level key `['state_dict']` and only fit the custom CoLaR scaffold (base LLM + `[PAD]` resize + r128 q/v LoRA + a `LatentPolicy` MLP), loaded `strict=False`. Load the base separately and splice this `state_dict` in. Runtime env:
19
- ```
20
- COLAR_BASE=<base> COLAR_CKPT=colar-gsm/colar_best.ckpt COLAR_EMB_STD=0.018 COLAR_COMPRESS=5 COLAR_MAXLAT=64 TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD=1
21
- ```
22
- `TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD=1` is required for these older Lightning ckpts.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Physics (relation selection), Llama-3.2-1B
15
+
16
+ A **CoLaR** (Compressed Latent Reasoning) checkpoint for **Physics (relation-selection 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:** Physics (relation-selection reasoning)
22
+ - **Warm-start:** colar-gsm
23
+ - **Files:** `colar_physics.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.
28
+
29
+ ## Datasets
30
+ - Physics reasoning mix (relation selection)
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).*