Skip to content

Pypi - #761

Merged
jiapingW merged 6 commits into
mainfrom
pypi
Aug 21, 2026
Merged

Pypi#761
jiapingW merged 6 commits into
mainfrom
pypi

Conversation

@jiapingW

Copy link
Copy Markdown
Collaborator

Motivation

This PR fixes inconsistencies between offline capture behavior, documentation, and the PyPI release process.

In particular:

  • Offline hidden-state preparation independently re-read --draft-model-config as a local JSON file, preventing target-derived
    configurations from working correctly.

  • Explicit "draft_vocab_size": null could incorrectly fall back to vocab_size.

  • Several documentation paths, Mooncake guarantees, Kimi K3 revision descriptions, and gate instructions were outdated or
    misleading.

  • The PyPI workflow only produced an sdist, mixed token and OIDC authentication, and unintentionally packaged unrelated top-level
    modules.

Modifications

  • Resolve draft_vocab_size from the canonical capture_plan.draft_config.

    • Prefer an explicitly provided draft_vocab_size.
    • Fall back to vocab_size only when draft_vocab_size is absent.
    • Reject an explicitly configured draft_vocab_size: null.
    • Preserve target-derived draft configuration behavior.
  • Correct documentation:

    • Fix the Llama EAGLE3 configuration filename.
    • Replace the removed gate orchestrator reference with the manual gate README.
    • Clarify Mooncake hard-pin guarantees for older and Ascend clients.
    • Distinguish the recommended Kimi K3 revision from compatibility-validation targets.
    • Fix the gate README’s stage count, numbering, headings, stray character, and DSpark terminology.
    • Add the Kimi K3 recipe to the Sphinx toctree.
    • Fix the Inkling spelling.
    • Update source installation commands.
  • Improve PyPI packaging and publishing:

    • Restrict package discovery to specforge*.
    • Build and validate both wheel and sdist distributions.
    • Use PyPI Trusted Publishing exclusively.
    • Separate build and publish jobs.
    • Correct the PyPI project URL.
    • Add publishing concurrency protection.
    • Update the GitHub Actions dependencies.

Related Issues

N/A.

Accuracy Test

Not applicable. This PR does not change kernels, model architecture, forward computation, or numerical behavior.

Validation performed:

  • 26 targeted unit tests passed:

    python -m unittest -v
    tests.test_scripts.test_prepare_hidden_states
    tests.test_runtime.test_model_loading

  • Both distributions passed strict metadata validation:

    python -m build
    python -m twine check --strict dist/*

  • The wheel passed archive-integrity, isolated installation, version, import, and CLI smoke tests.

  • The PyPI publishing workflow completed successfully.

  • specforge==0.2.0 was downloaded from public PyPI and installed successfully.

Benchmark & Profiling

Checklist

@jiapingW

Copy link
Copy Markdown
Collaborator Author

@maocheng23 help cc.

*,
max_attempts: int = 40,
retry_interval_s: float = 0.5,
max_attempts: int = DEFAULT_PENDING_DRAIN_MAX_ATTEMPTS,

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.

But this means the default would be 8x0.25s, will it be too low?

@jiapingW
jiapingW merged commit 10a61a1 into main Aug 21, 2026
6 checks passed
@jiapingW
jiapingW deleted the pypi branch August 21, 2026 01:38
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.

2 participants