parallel-ttt-cot-qwen3-1b-v1

This repository contains a standalone PEFT LoRA adapter exported from the Lightning checkpoint epoch=0-step=4663.ckpt. The adapter is not merged into the base model, so it can be loaded later and continued from as a trainable LoRA adapter.

Important: although the repo name says qwen3-1b, the checkpoint itself was trained against the base model Qwen/Qwen3-1.7B and the adapter metadata points to that base model.

What is in this repo

  • PEFT adapter files: adapter_model.safetensors, adapter_config.json
  • Base-model text assets: tokenizer.json, tokenizer_config.json, chat_template.jinja, generation_config.json, config.json
  • Extra non-PEFT trainables from the original checkpoint: non_peft_trainables.safetensors
  • Lightning-loadable checkpoint for module_class.load_from_checkpoint(..., config=args, ...): lightning_checkpoint.ckpt
  • Metadata: export_metadata.json, non_peft_trainables_metadata.json, lightning_checkpoint_metadata.json

Full trainable state summary

The original training state exported here includes:

  • 56 LoRA tensors saved in adapter_model.safetensors
  • 4 weighting-model tensors in non_peft_trainables.safetensors:
    • weight_model.fc1.weight
    • weight_model.fc1.bias
    • weight_model.fc2.weight
    • weight_model.fc2.bias
  • 1 learned inner-loop LR tensor in non_peft_trainables.safetensors:
    • lrs.lr

Load adapter for continued LoRA finetuning

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base_model_id = "Qwen/Qwen3-1.7B"
adapter_id = "zechen-nlp/parallel-ttt-cot-qwen3-1b-v1"

tokenizer = AutoTokenizer.from_pretrained(adapter_id)
base_model = AutoModelForCausalLM.from_pretrained(
    base_model_id,
    torch_dtype="auto",
    device_map="auto",
)
model = PeftModel.from_pretrained(base_model, adapter_id, is_trainable=True)

Load the extra non-PEFT trainables

from safetensors.torch import load_file

extra = load_file("non_peft_trainables.safetensors")
weight_model_state = {
    k.split('weight_model.', 1)[1]: v
    for k, v in extra.items()
    if k.startswith('weight_model.')
}
learned_inner_lrs = extra['lrs.lr']

Load the Lightning checkpoint

This checkpoint is intended for the same loading path used in perk/runner.py:

model = module_class.load_from_checkpoint(
    checkpoint_path,
    config=args,
    map_location="cuda:0",
)

If you want to download it from the Hub first:

from huggingface_hub import hf_hub_download
from omegaconf import OmegaConf
from perk.modules import MetaLearningModule

repo_id = "zechen-nlp/parallel-ttt-cot-qwen3-1b-v1"
checkpoint_path = hf_hub_download(repo_id=repo_id, filename="lightning_checkpoint.ckpt")

# Supply a compatible config explicitly. The checkpoint intentionally omits
# hyper_parameters and other training/runtime state.
args = OmegaConf.create({
    # fill in the same config fields your module expects
})

model = MetaLearningModule.load_from_checkpoint(
    checkpoint_path,
    config=args,
    map_location="cpu",
)

lightning_checkpoint.ckpt only keeps the top-level keys needed for that load path:

  • state_dict
  • pytorch-lightning_version

So unlike a full Lightning training checkpoint, it does not include optimizer state, scheduler state, callbacks, loops, or embedded hyperparameters.

Downloads last month
68
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for zechen-nlp/parallel-ttt-cot-qwen3-1b-v1

Finetuned
Qwen/Qwen3-1.7B
Adapter
(446)
this model