Run this model with HF Jobs
Run dogtooth/open-lm-3b-201305-midtrain-stage2-think on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/dogtooth/open-lm-3b-201305-midtrain-stage2-think. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/dogtooth/open-lm-3b-201305-midtrain-stage2-think on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/dogtooth/open-lm-3b-201305-midtrain-stage2-think. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/dogtooth/open-lm-3b-201305-midtrain-stage2-think. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use dogtooth/open-lm-3b-201305-midtrain-stage2-think with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dogtooth/open-lm-3b-201305-midtrain-stage2-think with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dogtooth/open-lm-3b-201305-midtrain-stage2-think", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("dogtooth/open-lm-3b-201305-midtrain-stage2-think", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use dogtooth/open-lm-3b-201305-midtrain-stage2-think with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dogtooth/open-lm-3b-201305-midtrain-stage2-think" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dogtooth/open-lm-3b-201305-midtrain-stage2-think", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dogtooth/open-lm-3b-201305-midtrain-stage2-think
- SGLang
How to use dogtooth/open-lm-3b-201305-midtrain-stage2-think with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "dogtooth/open-lm-3b-201305-midtrain-stage2-think" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dogtooth/open-lm-3b-201305-midtrain-stage2-think", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "dogtooth/open-lm-3b-201305-midtrain-stage2-think" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dogtooth/open-lm-3b-201305-midtrain-stage2-think", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dogtooth/open-lm-3b-201305-midtrain-stage2-think with Docker Model Runner:
docker model run hf.co/dogtooth/open-lm-3b-201305-midtrain-stage2-think
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:
dogtooth/open-lm-3b-201305โ base oracle pretrain.dogtooth/open-lm-3b-201305-midtrainโ mid-train on pre-cutoff peS2o + Wikipedia + DCLM to consolidate knowledge.dogtooth/open-lm-3b-201305-midtrain-stage1-sftโ stage1 SFT (instruction following) on Dolci.- 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
| Property | Value |
|---|---|
| Base model | dogtooth/open-lm-3b-201305-midtrain-stage1-sft |
| Architecture | LLaMA-style with QK norm (OpenLMForCausalLM, custom code) |
| Parameters | ~2.8B |
| Knowledge cutoff | May 2013 |
| Vocab size | 50,432 |
| Context length | 2,048 |
| Stage2 framework | LLaMA-Factory (full FT, DeepSpeed ZeRO-2) |
| Stage2 data | think_v2 reasoning mixture (pre-cutoff prompts) |
| Stage2 LR | 4e-5 |
| Stage2 epochs | 3 (final ckpt-3873) |
Usage
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
@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}
}
- Downloads last month
- 15
Model tree for dogtooth/open-lm-3b-201305-midtrain-stage2-think
Base model
dogtooth/open-lm-3b-201305