CoolFace
Modelpublic

dogtooth/open-lm-3b-201305-midtrain-stage2-think

sourceHugging Faceapple-asclupdated 4mo agoView on Hugging Face
0likes11downloads
Model Card

Open LM 3B — Mid-Train + Stage1 SFT + Stage2 Think (Knowledge Cutoff May 2013)

Stage2 supervised fine-tune (reasoning / <think>-tagged responses, think_v2 mixture at lr=4e-5) on top of the mid-trained + stage1-SFT Apple Open LM 3B oracle model with knowledge cutoff May 2013, from the TiC-LM (Time-Continual Language Modeling) / Chrononauts project.

Pipeline:

  1. 1.dogtooth/open-lm-3b-201305 — base oracle pretrain.
  2. 2.dogtooth/open-lm-3b-201305-midtrain — mid-train on pre-cutoff peS2o + Wikipedia + DCLM to consolidate knowledge.
  3. 3.dogtooth/open-lm-3b-201305-midtrain-stage1-sft — stage1 SFT (instruction following) on Dolci.
  4. 4.This repo — stage2 think SFT (reasoning, think_v2 mixture, lr=4e-5, 3 epochs).

Fine-tuned with LLaMA-Factory (finetuning_type: full, DeepSpeed ZeRO-2).

Model Details

PropertyValue
Base modeldogtooth/open-lm-3b-201305-midtrain-stage1-sft
ArchitectureLLaMA-style with QK norm (OpenLMForCausalLM, custom code)
Parameters~2.8B
Knowledge cutoffMay 2013
Vocab size50,432
Context length2,048
Stage2 frameworkLLaMA-Factory (full FT, DeepSpeed ZeRO-2)
Stage2 datathink_v2 reasoning mixture (pre-cutoff prompts)
Stage2 LR4e-5
Stage2 epochs3 (final ckpt-3873)

Usage

python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model = AutoModelForCausalLM.from_pretrained(
    "dogtooth/open-lm-3b-201305-midtrain-stage2-think",
    dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained(
    "dogtooth/open-lm-3b-201305-midtrain-stage2-think", trust_remote_code=True
)

messages = [{"role": "user", "content": "What is the capital of France?"}]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=512, do_sample=True, temperature=0.7, top_p=0.9)
print(tokenizer.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=False))

Repository Contents

  • —Final model weights at the repo root (model-*.safetensors, ckpt-3873)
  • —Intermediate checkpoints in checkpoint-3000/, checkpoint-3500/ (HF-format weights only; DeepSpeed optimizer shards omitted)
  • —trainer_state.json, trainer_log.jsonl, all_results.json, train_results.json

Citation

bibtex
@article{jain2024ticlm,
  title={Time-Continual Learning from a Streaming Language Model},
  author={Jain, Ameya and Ramesh, Aakanksha and Li, Tianjian and others},
  journal={arXiv preprint arXiv:2410.14660},
  year={2024}
}