Model Documentation Standard
This standard outlines a structured template for documenting AI/ML models. It ensures transparency, reproducibility, and accountability across data lineage, evaluation datasets, limitations, and change history. Documentation should be maintained in a version-controlled repository (e.g., Markdown, PDF, or JSON format) and updated with every model release.
1. Data Lineage
Document the complete provenance of training data, including sources, processing steps, and transformations. Use diagrams (e.g., DAGs via tools like Apache Airflow or MLflow) where possible.
1.1 Data Sources
-
Primary Sources: List all raw data origins (e.g., public datasets like Common Crawl, internal databases).
- Name/URL: [e.g., Hugging Face Datasets -
openwebtext]
- Version/Hash: [e.g., v1.0, SHA256: abc123...]
- License: [e.g., MIT]
- Size: [e.g., 40TB uncompressed]
- Date Accessed: [YYYY-MM-DD]
-
Secondary Sources: Aggregated or derived datasets (e.g., filtered subsets).
1.2 Processing Pipeline
-
Steps: Sequential list of transformations.
| Step | Description | Tool/Library | Parameters | Output Size |
|---|
| 1. Download | Fetch raw data | datasets library | None | 40TB |
| 2. Deduplication | Remove duplicates via MinHash | datatrove | Threshold: 0.8 | 35TB |
| 3. Filtering | Remove PII, low-quality text | Custom regex + classifiers | Quality score > 0.5 | 20TB |
| 4. Tokenization | BPE encoding | tokenizers | Vocab size: 50k | 15TB tokenized |
-
Lineage Diagram: Embed or link to a visual flow (e.g., Mermaid or Lucidchart).
1.3 Auditing
- Contamination Checks: Evidence of overlap with eval sets (e.g., perplexity scores).
- Bias Scans: Tools used (e.g.,
crowdkit for demographic analysis).
- Reproducibility Script: Link to exact reproduction command/script.
2. Evaluation Datasets
Detail all datasets used for benchmarking, including held-out test sets. Report metrics stratified by subsets (e.g., by language, domain).
2.1 Dataset Inventory
| Dataset Name | Source/URL | Version/Hash | Size (# examples) | Splits (Train/Val/Test) | License |
|---|
| MMLU | [Hugging Face] | 2022-12-01 | 15k | N/A / N/A / 15k | CC-BY |
| HellaSwag | [AllenAI] | v2 | 80k | 39k / 10k / 30k | CC-BY-SA |
| Custom Internal | Internal | v1.0-sha456 | 5k | N/A / 1k / 4k | Proprietary |
2.2 Metrics and Results
-
Core Metrics: List primary (e.g., accuracy, perplexity) and secondary (e.g., robustness to adversarial inputs).
| Metric | Value | Std. Dev. | Subset Breakdown |
|---|
| MMLU (5-shot) | 72.5% | ±0.2 | STEM: 68%, Humanities: 75% |
| Perplexity (WikiText-103) | 12.3 | ±0.1 | N/A |
-
Evaluation Protocol: Prompt templates, few-shot examples, hardware (e.g., A100 x8, batch size 32).
-
Third-Party Benchmarks: Links to leaderboards (e.g., LMSYS Arena, Open LLM Leaderboard).
2.3 Compute Details
- FLOPs: [e.g., 1.2e21]
- Runtime: [e.g., 2 hours on 8x H100]
3. Limitations
Explicitly state known weaknesses to guide users and prevent misuse. Categorize by type.
3.1 Performance Limitations
- Fails on long-context reasoning (>4k tokens): Accuracy drops 15%.
- Domain-specific gaps: Low performance on code generation (45% HumanEval pass@1).
3.2 Bias and Fairness
- Demographic biases: Overrepresents English/Western data (95% English).
- Measured via: BOLD benchmark (disparity score: 0.25).
- Toxicity: 2x higher generation rate for certain prompts (e.g., political topics).
3.3 Safety and Ethical Issues
- Jailbreak vulnerability: Succeeds on 30% of AdvBench attacks.
- Hallucination rate: 18% on fact-checking tasks.
- Environmental Impact: Training CO2 equivalent: 500 tons.
3.4 Scope and Usage Warnings
- Not for high-stakes decisions (e.g., medical/legal).
- Out-of-distribution degradation: -20% on non-English languages.
4. Change History
Maintain a changelog in reverse chronological order. Use semantic versioning (e.g., MAJOR.MINOR.PATCH).
4.1 Version Log
| Version | Date | Changes | Diff Summary | Artifacts |
|---|
| v2.1.0 | 2024-10-15 | Fine-tuned on RLHF data; +5% MMLU | +2B params, new LoRA adapters | [HF Model ID], [Weights SHA] |
| v2.0.0 | 2024-09-01 | Architecture update (added MoE) | Breaking: Vocab resize | [HF Model ID] |
| v1.0.0 | 2024-07-20 | Initial release | Base Llama-3 70B | [HF Model ID] |
4.2 Deprecations
- List removed features/datasets.
4.3 Contributors
- Primary: [Author1 @trailblazerlabs]
- Reviewers: [Author2, Author3]
Additional Requirements
- Header: Model name, release date, organization.
- Footer: Contact for questions, license (e.g., Apache 2.0).
- Format: Machine-readable where possible (e.g., YAML for lineage).
- Review Process: Peer-reviewed before release.
This standard promotes best practices aligned with frameworks like MLCommons, Datasheets for Datasets, and Model Cards. Adapt as needed for specific model types (e.g., vision vs. language).