Instructions to use zgcagi/ZGCM-1-7B-Midtrain-Staged-64K with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zgcagi/ZGCM-1-7B-Midtrain-Staged-64K with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zgcagi/ZGCM-1-7B-Midtrain-Staged-64K", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("zgcagi/ZGCM-1-7B-Midtrain-Staged-64K", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use zgcagi/ZGCM-1-7B-Midtrain-Staged-64K with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zgcagi/ZGCM-1-7B-Midtrain-Staged-64K" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zgcagi/ZGCM-1-7B-Midtrain-Staged-64K", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/zgcagi/ZGCM-1-7B-Midtrain-Staged-64K
- SGLang
How to use zgcagi/ZGCM-1-7B-Midtrain-Staged-64K 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 "zgcagi/ZGCM-1-7B-Midtrain-Staged-64K" \ --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": "zgcagi/ZGCM-1-7B-Midtrain-Staged-64K", "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 "zgcagi/ZGCM-1-7B-Midtrain-Staged-64K" \ --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": "zgcagi/ZGCM-1-7B-Midtrain-Staged-64K", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use zgcagi/ZGCM-1-7B-Midtrain-Staged-64K with Docker Model Runner:
docker model run hf.co/zgcagi/ZGCM-1-7B-Midtrain-Staged-64K
ZGCM-1-7B-Midtrain-Staged-64K
Completed 64K stage of the staged mid-training route, following the 32K stage.
| Property | Value |
|---|---|
| Checkpoint step within its run | 19206 |
| Training context | 65,536 tokens |
| Training tokens (mid-training cumulative, excluding pretraining) | approximately 422.16B |
| Precision | BF16 |
| RoPE base | 5,000,000 |
| Stage completed | Yes |
This is a base language-model checkpoint. It has not undergone instruction tuning. Use plain text inputs; the included tokenizer assets retain the original token IDs.
Loading
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "zgcagi/ZGCM-1-7B-Midtrain-Staged-64K"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id, trust_remote_code=True, torch_dtype=torch.bfloat16,
device_map="auto", attn_implementation="eager",
)
inputs = tokenizer("The purpose of scientific research is", return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=32, do_sample=False, use_cache=False)
print(tokenizer.decode(output[0], skip_special_tokens=True))
The repository includes the custom ZGCM Transformers implementation. The loading example uses its uncached reference generation path. Conversion and short forward/ generation checks used PyTorch 2.7 and Transformers 4.57.0.
Conversion validation
Exported with export_megatron_zgcm_to_hf.py. All 259 source model tensors round-trip
exactly through the 382 exported tensors, preserving BF16 values, grouped Q/G/K/V
layout, SwiGLU weights, and normalization parameters. Every exported shard is
listed in model.safetensors.index.json and SHA256SUMS.
Local HF loading had no missing or unexpected tensors. A 160-token forward pass and short greedy generation passed. These checks do not constitute a native Megatron-versus-HF logits comparison or long-context benchmark validation.
See checkpoint_info.json for the precise checkpoint identity and validation scope.
- Downloads last month
- 12