Skip to content

[docs] Fix [[autodoc]] directives in ALBERT model documentation - #48593

Merged
vasqu merged 1 commit into
huggingface:mainfrom
samyuktahegde:albert-autodoc-investigation
Sep 7, 2026
Merged

vasqu merged 1 commit into
huggingface:mainfrom
samyuktahegde:albert-autodoc-investigation

Conversation

@samyuktahegde

@samyuktahegde samyuktahegde commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

CPU CI GPU run-slow

What does this PR do?

In the ALBERT model documentation page (https://huggingface.co/docs/transformers/main/en/model_doc/albert) some [[autodoc]] sections don't render the proper text.
I've made the following changes as per the guidelines in https://github.com/huggingface/doc-builder#autodoc. I also referred other files like bert.md to confirm the correct format.

Before After
[[autodoc]] AlbertModel - forward [[autodoc]] AlbertModel
    - forward
[[autodoc]] AlbertForPreTraining - forward
[[autodoc]] AlbertForMaskedLM - forward
[[autodoc]] AlbertForSequenceClassification - forward
[[autodoc]] AlbertForTokenClassification - forward
[[autodoc]] AlbertForQuestionAnswering - forward
Applied the same changes as above (moved the - forward to the next line with indentation)
[[autodoc]] AlbertTokenizer - build_inputs_with_special_tokens - get_special_tokens_mask - create_token_type_ids_from_sequences - save_vocabulary [[autodoc]] AlbertTokenizer
    - get_special_tokens_mask
    - save_vocabulary

1. Moved the methods to separate lines with indentation.
2. Removed - build_inputs_with_special_tokens and - create_token_type_ids_from_sequences as they don't seem to exist in AlbertTokenizer's class hierarchy

I was able to run doc-builder build and the resulting albert.mdx contained the proper documentation.

I used AI assistance to understand and set up the local documentation build environment.

Code Agent Policy

The Transformers repo is currently being overwhelmed by a large number of PRs and issue comments written by
code agents. These often are low-quality, or fix extremely minor issues that occur rarely or never in practice.
As a result, we're instituting a rule that first-time contributors should not use code agents to submit PRs or issues.
We'd also ask autonomous "OpenClaw"-like agents not to open any PRs or issues.

Issues/PRs from first-time contributors that violate this rule will probably just be closed without review, and we
might block you, especially if you open more than one or appear to be deliberately ignoring this. We especially do not
want new contributors to jump in on random issues to contribute an agent-written fix. This creates lots of noise
for reviewers and other users and will almost certainly get you blocked.

For more information, please read CONTRIBUTING.md.

  • (First-time contributors only): I confirm that this PR description and code is not written by an LLM or code agent

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline and the
    Pull Request checks?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes according to the guidelines?
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 34123400608
Result: success | Grafana metrics are not available yet.

@vasqu vasqu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks valid cc @stevhliu if you could also sanity check

@stevhliu stevhliu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@vasqu
vasqu added this pull request to the merge queue Sep 7, 2026
Merged via the queue into huggingface:main with commit f67ec2b Sep 7, 2026
33 checks passed
sbucaille pushed a commit to sbucaille/transformers that referenced this pull request Sep 16, 2026
@samyuktahegde
samyuktahegde deleted the albert-autodoc-investigation branch September 18, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants