A Fully Open and Extremely Efficient Foundation Model for Math and Agentic Search
Zhongguancun Academy · Zhongguancun Institute of Artificial Intelligence
📄 Tech Report · 🤗 Model · 🤗 Data · 📊 Results · 💻 Training Code · 💬 WeChat Community
Introduction
ZGCM-1 is a 7.39B-parameter dense language model trained from scratch, built for mathematical reasoning and tool-assisted search. It combines deliberate internal thinking with active information gathering, supporting 256K-token context and both thinking and direct-response modes in a single model.
The project brings together an efficient hybrid-attention architecture, FP8 training with Muon, progressive long-context mid-training, and general-agentic supervised fine-tuning. Researcher-directed AI agents contribute throughout development, from data curation and cluster operations to evaluation and deployment.
ZGCM-1-Data is the training collection behind that model: a bilingual Chinese-English corpus for large language model training, covering general pretraining, capability-oriented and long-context midtraining, and supervised fine-tuning.
The collection includes web pages, books, papers, PDF/OCR text, encyclopedic content, code, mathematics, question answering, reasoning, instruction following, tool use, and software engineering trajectories.
Evaluation Results
ZGCM-1, the 7.39B model trained on this collection, reaches the following scores. Results are from the technical report, using the 256K SFT checkpoint in thinking mode. Non-agentic evaluations use temperature 1.0, top-p 1.0, and mean pass@1 over 32 runs unless otherwise specified.
Selected reasoning benchmarks
| Benchmark (%) | ZGCM-1 | DeepSeek-R1-0528-Qwen3-8B | MiniCPM4.1-8B | Qwen3-8B | Olmo 3 7B Think |
|---|---|---|---|---|---|
| MATH-500 | 97.13 | 96.32 | 95.60 | 96.20 | 95.10 |
| AIME 2024 | 80.62 | 83.33 | 83.33 | 80.00 | 71.60 |
| AIME 2025 | 73.33 | 75.21 | 73.33 | 63.33 | 64.60 |
| AIME 2026 | 75.00 | 69.17 | 71.67 | 66.67 | 66.16 |
| HMMT 2025 | 70.42 | 61.50 | 52.50 | 43.33 | 43.89 |
| HMMT 2026 | 59.48 | 51.52 | 46.21 | 45.45 | 43.94 |
Selected rows and models from Table 2; bold marks the best score in each displayed row. The full evaluation covers 20 benchmarks, including code, knowledge, and instruction following.
Agentic search
| Benchmark | ZGCM-1 (%) | Setting |
|---|---|---|
| WebWalkerQA | 63.09 | Web search and page reading |
| BrowseComp | 19.43 | Web search and page reading |
| GAIA (text-only) | 42.52 | Web search and page reading |
| Binary Function Search | 62.00 | 31/50 exact function-entry matches using Ghidra tools |
Source: Tables 3–4. Web research allows up to 64 search-and-read steps. Binary Function Search uses a separate protocol on 50 tasks from 10 held-out projects.
Dataset Overview
| Stage | Configuration | Size | Primary purpose |
|---|---|---|---|
| Pretrain | zgcm-1-pretrain-stage1 |
990.1B tokens | Curriculum learning |
| Pretrain | zgcm-1-pretrain-stage2 |
3,201.3B tokens | Continued pretraining on the full data mixture |
| Midtrain | zgcm-1-midtrain-16k |
Approx. 180B tokens | Capability-oriented training |
| Midtrain | zgcm-1-midtrain-64k |
Approx. 240B tokens | 64K long-context training |
| Midtrain | zgcm-1-midtrain-256k |
Approx. 180.9B tokens | 256K long-context training |
| SFT | zgcm-1-sft |
Approx. 4.57M samples; 19.46B packed tokens | Instruction, reasoning, code, tool use, and context lengths up to 256K |
| Stage | Total tokens |
|---|---|
| Pretrain | 4,191.4B |
| Midtrain | Approx. 600.9B |
| SFT | 19.46B packed tokens |
Data Composition
Pretrain
The pretraining mixture contains approximately 4.2T tokens. Stage 1 supports curriculum learning, while Stage 2 continues pretraining on a broader mixture. The data covers web text, code, academic documents and OCR-processed PDFs, mathematics, LaTeX papers, reasoning, and encyclopedic content.
Major source families include Ultra-FineWeb, FinePDFs, OLMoCR, Stack-Edu, GitHub code, Nemotron, FineMath, OpenWebMath, Proof-Pile, arXiv, and FineWiki, together with other public or appropriately licensed sources.
Midtrain
The midtraining data is organized into nine categories:
| Category | Contents |
|---|---|
| Web | High-quality web pages and translated web content |
| Knowledge | Books, open educational resources, papers, PDF/OCR text, encyclopedic content, and domain references |
| Code | Code completion, question answering, rewriting, review, scientific computing, and software development tasks |
| Math | Mathematical textbooks, question answering, and reasoning data |
| QA | Large-scale question answering derived from web content |
| Reasoning | General reasoning, STEM, and research-oriented question answering |
| Instruction | General instruction-following and conversational data |
| Agentic | Tool use, environment interaction, and software engineering trajectories |
| Pretrain replay | Replay of general pretraining data |
Web and Knowledge data are further divided into three quality tiers. Long-context configurations combine shorter-prefix data with examples from the target length range to retain general capabilities while increasing long-context coverage.
Length groups are defined as follows:
| Length group | Token range |
|---|---|
le16k |
(0, 16K] |
gt16k_le64k |
(16K, 64K] |
gt64k |
>64K, used in the 256K configuration |
SFT
The SFT configuration contains approximately 4.57M samples from 50 source-level components. It covers:
- general instruction following and knowledge question answering;
- mathematical, scientific, and code reasoning;
- multilingual and safety-oriented tasks;
- search, tool use, and multi-turn conversations;
- software engineering and agent trajectories; and
- context lengths up to 256K.
Each sample retains a stable source identifier for provenance tracking and analysis.
Detailed source composition, mixture weights, curriculum design, and length distributions are described in the accompanying technical report [1].
Dataset Structure
All six configurations use a shared Parquet schema. Full-text Pretrain and Midtrain records primarily use the text field:
{
"text": "Model-visible training text.",
"source": "source-name",
"source_group": "normalized-source-group",
"upstream_repos": ["organization/dataset"],
"upstream_revision": "revision",
"licenses": ["upstream-license-identifier"],
"release_mode": "full_text",
"category": "web",
"token_count": 1024,
"metadata_json": "{...}"
}
SFT
{
"id": "sample-id",
"messages": [
{"role": "user", "content": "..."},
{"role": "assistant", "content": "..."}
],
"tools_json": "[]",
"source": "source-name",
"source_group": "normalized-source-group",
"upstream_repos": ["organization/dataset"],
"upstream_revision": "revision",
"licenses": ["upstream-license-identifier"],
"release_mode": "full_text",
"metadata_json": "{...}"
}
Variable-structure fields are serialized as JSON strings. tools_json stores tool definitions, locator_json stores source locator fields, and metadata_json stores additional source metadata. For full-text records, licenses records the applicable upstream license at the leaf-source or item level. database_license: odc-by-1.0 identifies a database-level license and does not replace item-level licenses. Public sources without a declared upstream license use license_status: not_declared_upstream.
Data files use Zstandard-compressed Parquet and are stored under data/<config>/. Code derived from GHArchive is not included as full text in the training files. Commit-addressable sample and repository indexes are available under indexes/gharchive-clean-v6-core/.
Index-only Records
For sources that cannot be redistributed directly, require separate acceptance of upstream terms or access approval, or require users to verify licensing with the upstream provider, the dataset provides index_only records. These records contain source locators but no model-visible text:
{
"id": "sample-id",
"source": "source-name",
"upstream_repos": ["organization/dataset"],
"upstream_revision": "revision",
"token_count": 1024,
"locator_json": "{\"upstream_id\":\"upstream-record-id\",\"text_sha256\":\"...\"}",
"release_mode": "index_only",
"content_withheld_reason": "upstream_access_required"
}
index_only records do not contain text, content, prompts or responses, messages, reasoning, solutions, tool calls, observations, trajectories, or free-form metadata that may expose source text. Each index uses a fixed upstream revision and provides either a record identifier or a file path and line number that resolves within that revision.
Code indexes may additionally include repo_name, repo_url, path, blob_id, commit identifiers, language, and detected license information, but do not include source code text.
Sources Requiring Separate Upstream Access
The following sources require users to accept upstream terms or request access separately. This dataset provides index records for these sources without redistributing their full text:
| Upstream source | Access requirement | Stage |
|---|---|---|
| NVIDIA Nemotron-CC v2 and v2.1 | Manual Hugging Face approval and acceptance of the NVIDIA Data Agreement | Midtrain |
| NVIDIA Nemotron-CC-Code v1 and Nemotron-Pretraining-Code v1/v2 | Manual Hugging Face approval and acceptance of the NVIDIA Data Agreement | Pretrain and Midtrain |
| NVIDIA Nemotron-CC-Math v1 | Hugging Face access confirmation and acceptance of the NVIDIA Data Agreement | Pretrain and Midtrain |
| BigCode The Stack v2 | Hugging Face access confirmation; individual files remain subject to their repository licenses | Pretrain and Midtrain replay |
| GAIR daVinci-Dev | Hugging Face access confirmation; the dataset contains multiple upstream licenses | Midtrain |
| OpenBMB UltraData-SFT-2605 | Hugging Face access confirmation | SFT |
The following sources are also distributed as indexes only:
| Source | Index format |
|---|---|
GitGud code records with license=unknown |
No repository license was detected upstream |
| Code records derived from GHArchive | Located by repository, full Git commit SHA, and relative file path; source code remains available from the upstream repository |
When an upstream source does not declare a single license or contains multiple licenses, license_status records the corresponding state. Users should consult the upstream repository and revision fields together with the relevant data card and access terms.
Data Processing
Depending on the data type, processing includes the following steps:
- Text extraction, schema normalization, and source attribution.
- Removal of invalid Unicode, control characters, empty text, and malformed records.
- Exact deduplication, with additional conservative near-deduplication for Midtrain.
- Quality filtering using programmatic rules, source quality scores, quality classifiers, and checks tailored to OCR, code, mathematics, and tool-use trajectories. High-risk erroneous samples are also removed from selected mathematical sources.
- Validation of tool calls, tool responses, and message ordering in tool-use and agent data.
- Token counting and length grouping with the GLM-5.1 tokenizer.
- Sample-level sampling and shuffling by source, category, and length.
To improve coverage of scarce capabilities, a small number of carefully filtered, capacity-limited sources are upsampled in a controlled manner. Source identifiers are retained for all samples, and repeat-sampling information is stored in metadata_json where available.
The accompanying technical report provides additional details on processing, parameters, and deduplication [1].
Loading
from datasets import load_dataset
dataset = load_dataset(
"zgcagi/ZGCM-1-Data",
name="zgcm-1-midtrain-64k",
split="train",
streaming=True,
)
See the repository README.md and file list for the available configurations.
Intended Use
This dataset is intended for:
- general language model pretraining;
- capability development in code, mathematics, reasoning, question answering, and knowledge;
- long-context training from 16K to 256K tokens;
- supervised fine-tuning for instruction following, tool use, and software engineering; and
- research on data mixtures, quality stratification, and training-data methodology.
Limitations
- The collection primarily covers Chinese, English, and common programming languages; representation is not uniform across languages.
- Accuracy, formatting consistency, and reasoning reliability may vary across sources.
- Quality filtering and deduplication improve aggregate data quality but do not replace task-specific downstream evaluation.
- The coverage and writing style of synthetic data may reflect the models used to generate it.
- Additional domain- and application-specific evaluation is recommended for specialized or high-impact use cases.
License
This collection combines data under multiple upstream licenses and is therefore labeled other at the Hugging Face repository level.
- Each sub-source or item remains subject to its upstream license and terms. Provenance, revision, and license information is provided in
upstream_repos,upstream_revision,licenses, andlicense_status. database_license: odc-by-1.0denotes a database-level license and does not replace rights or restrictions attached to individual documents or code files.- Records under CC-BY-NC-4.0 may only be used as permitted by that license, including its non-commercial restriction.
index_onlyrecords contain no source text; an index does not grant or replace an upstream license.- Original processing scripts, manifest templates, and documentation that the project is authorized to license are released under the MIT License. The MIT License does not cover third-party data.
Users are responsible for reviewing the record-level metadata, upstream data cards, and applicable terms before use.
WeChat Community
Scan the QR code to join the ZGCM-1 community group. Click the image to open it at full size. If the code has expired, please open a Discussion and ask the maintainers for the latest one.
References
[1] ZGCM Team. ZGCM-1: A Fully Open and Extremely Efficient Foundation Model for Math and Agentic Search. 2026. PDF
- Downloads last month
- 971

