Skip to content

fix minor docs, testing, and npu detection issues - #47545

Closed
DhanushPillay wants to merge 6 commits into
huggingface:mainfrom
DhanushPillay:fix-docs-and-typos
Closed

fix minor docs, testing, and npu detection issues#47545
DhanushPillay wants to merge 6 commits into
huggingface:mainfrom
DhanushPillay:fix-docs-and-typos

Conversation

@DhanushPillay

@DhanushPillay DhanushPillay commented Jul 25, 2026

Copy link
Copy Markdown

This pull request includes several improvements and fixes across documentation, model integration utilities, device detection, and testing utilities. The most notable changes involve enhanced device detection for NPUs, improved flexibility in generation output comparison tests, and documentation corrections.

Device detection and integration improvements:

  • Enhanced NPU device detection in get_device_properties to use torch.npu.is_available() for more reliable and consistent behavior, aligning with CUDA/XPU checks.
  • In DecompressExperts, the reverse_op property now returns an _IdentityOp instead of None, addressing a previous FIXME and improving the conversion operation interface.
  • Added _IdentityOp import to compressed_tensors.py to support the above change.

Testing and configuration:

  • In test_generate_with_static_cache, the test now uses instance attributes for atol and rtol tolerances, allowing model-specific overrides and improving test flexibility.
  • For OlmoModelTest, added higher tolerance values for static cache generation tests, accommodating expected numeric drift in these scenarios.

Documentation fixes:

  • Fixed a typo in the Jais2 model documentation, correcting "cuulutre" to "culture".
  • Added a link to Cohere in the Cohere2 MoE model documentation for clarity and reference.

Other codebase maintenance:

  • Removed a temporary hack related to generation_config initialization in trainer_seq2seq.py, as part of ongoing codebase cleanup.
    CI

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution 🤗!

CI Security Gate — automatic approval blocked

This PR was not automatically approved for CI because the security gate failed.

Possible reasons:

  • The PR touches 50 or more files — only PRs with fewer than 50 changed files are automatically approved
  • A changed file is outside the allowed directories (src/, tests/, docs/, utils/), has a disallowed extension (only .py, .txt, .md permitted outside tests/ and docs/), or is not .md/.yml inside docs/
  • A new high-severity security issue was detected in the changed Python files (Bandit check)

See the workflow run for the exact violations.

A maintainer can review and manually approve CI if a finding is a false positive.

- compressed_tensors.py: return _IdentityOp from DecompressExperts.reverse_op

- testing_utils.py: update NPU detection logic for torch 2.5.1

- trainer_seq2seq.py: remove temporary _from_model_config hack

- i18n: rename Hindi translation to standard README_hi.md

- docs: fix broken markdown links in cohere2_moe.md and examples/README.md
- Add getattr fallback for atol/rtol in GenerationTesterMixin.test_generate_with_static_cache

- Override static_cache_generate_atol and static_cache_generate_rtol to 2e-4 in OlmoModelTest
@github-actions

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: olmo

@github-actions

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 30162525272:2
Result: success | Jobs: 16 | Tests: 166,472 | Failures: 0 | Duration: 16h 8m

@DhanushPillay DhanushPillay changed the title Fix docs and typos fix minor docs, testing, and npu detection issues Jul 25, 2026
@Rocketknight1

Copy link
Copy Markdown
Member

No agent PRs from first-time contributors!

@DhanushPillay
DhanushPillay deleted the fix-docs-and-typos branch July 27, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants