docs: document training_regime field in the annotated model card#2656
Open
Sofeso wants to merge 1 commit into
Open
docs: document training_regime field in the annotated model card#2656Sofeso wants to merge 1 commit into
Sofeso wants to merge 1 commit into
Conversation
The modelcard_template.md in huggingface_hub has a 'Training Hyperparameters' subsection with a training_regime field, but this annotated model card guide jumps straight from Preprocessing to Speeds/Sizes/Times, so training_regime is never explained anywhere a user would look for it (as reported in huggingface#1125). Added the missing ### Training Hyperparameters subsection with a definition sourced from the template's own inline comment (fp32, fp16/bf16/fp8 mixed vs non-mixed precision), matching the field-name + italicized-explanation style already used for every other field in this file. Checked the other files the model_card_consistency_reminder workflow flags as duplicated content: - modelcard.md (this repo) only contains YAML frontmatter metadata, no body template - not applicable. - docs/hub/model-cards.md explicitly defers body-template details to this annotated file rather than duplicating them - not applicable. - huggingface_hub's modelcard_template.md and repocard.py already reference training_regime correctly - no fix needed there. So this is the single correct place to fix. Closes huggingface#1125
meg-huggingface
approved these changes
Jul 21, 2026
|
|
||
| `training_regime` | ||
|
|
||
| _The training regime, i.e. the numerical precision the model was actually trained with: `fp32`, `fp16` mixed precision, `bf16` mixed precision, `bf16` non-mixed precision, `fp16` non-mixed precision, or `fp8` mixed precision. This affects training speed and memory footprint, and in some cases the numerical stability of results, so it's useful for anyone trying to reproduce training or understand its resource requirements._ |
Contributor
There was a problem hiding this comment.
Since training regime is more broad, would suggest either
`numerical_precision`
_Provide the numerical precision the model was trained with (e.g., `fp32`, `fp16` mixed precision, `bf16` mixed precision, `bf16` non-mixed precision, `fp16` non-mixed precision, or `fp8` mixed precision). This affects training speed and memory footprint, and in some cases the numerical stability of results, so it's useful for anyone trying to reproduce training or understand its resource requirements._
Or go more broad:
`training_regime`
_Provide the training details that are useful for anyone trying to reproduce training or understand its resource requirements. This can include learning rate, batch size, and regularization method, among other hyperparameters. Numerical precision is particularly relevant here (e.g., `fp32`, `fp16` mixed precision, `bf16` mixed precision, `bf16` non-mixed precision, `fp16` non-mixed precision, or `fp8` mixed precision), as it affects training speed, memory footprint, and in some cases numerical stability._
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1125.
Problem
modelcard_template.md(inhuggingface_hub) has always had atraining_regimefield under "Training Hyperparameters":But
docs/hub/model-card-annotated.md— the doc that's supposed to explain every field in the template — jumps straight from### Preprocessingto### Speeds, Sizes, Times. There's no "Training Hyperparameters" subsection at all, sotraining_regimeis never explained anywhere a user would actually look for it, exactly as reported in #1125.Fix
Added the missing
### Training Hyperparameterssubsection between Preprocessing and Speeds/Sizes/Times, documentingtraining_regimewith the same field-name + italicized-explanation style used for every other field in this file. The definition (fp32 / fp16 / bf16 / fp8, mixed vs. non-mixed precision) is sourced directly from the template's own inline HTML comment, not invented.Consistency check
This repo's
model_card_consistency_reminderworkflow flags several files as containing duplicated model-card content, so I checked all of them before committing to a single-file fix:modelcard.md(this repo) — only YAML frontmatter metadata, no body template section. Not applicable.docs/hub/model-cards.md— explicitly defers body-template explanations to the annotated card ("Details on how to fill out the human-readable portion... is available in the Annotated Model Card") rather than duplicating them. Not applicable.huggingface_hub'smodelcard_template.mdandrepocard.py— already referencetraining_regimecorrectly; nothing to fix there.So
docs/hub/model-card-annotated.mdis the one place this needed to change.Disclosure
I used AI assistance (Claude) to investigate this issue and draft the fix. I reviewed the change and take responsibility for its accuracy.
Note
Low Risk
Documentation-only change with no runtime, API, or security impact.
Overview
Adds the missing Training Hyperparameters subsection to
docs/hub/model-card-annotated.md, between Preprocessing and Speeds, Sizes, Times, so the annotated guide matchesmodelcard_template.md.Documents the
training_regimeplaceholder with the same backtick field + italic explanation pattern as other fields, covering precision options (fp32, fp16/bf16/fp8, mixed vs non-mixed) and why the field matters for reproduction and resource planning.Reviewed by Cursor Bugbot for commit 2812008. Bugbot is set up for automated code reviews on this repo. Configure here.