Skip to content

build: support Python 3.13 conversion dependencies#417

Open
darsh7807 wants to merge 1 commit intomicrosoft:mainfrom
darsh7807:codex/support-python-3-13-v2
Open

build: support Python 3.13 conversion dependencies#417
darsh7807 wants to merge 1 commit intomicrosoft:mainfrom
darsh7807:codex/support-python-3-13-v2

Conversation

@darsh7807
Copy link

Summary

Fix installation on Python 3.13 for the conversion dependency set used by BitNet's top-level requirements.txt.

Root cause

BitNet's top-level requirements included vendored llama.cpp requirement files that pin torch~=2.2.1. That torch line does not provide cp313 wheels, so uv pip install -r requirements.txt fails on Python 3.13 with an unsatisfiable dependency resolution error.

Changes

  • Route top-level conversion requirement includes through BitNet-local wrapper files instead of referencing the vendored llama.cpp files directly
  • Keep torch~=2.2.1 for Python <3.13
  • Use torch>=2.5.0,<3.0.0 for Python >=3.13
  • Apply the same logic to the LoRA conversion path so top-level installs remain consistent and do not reintroduce the old torch pin transitively

Why this approach

The torch incompatibility exists in vendored submodule requirement files, but BitNet consumes those files through its own top-level requirements.txt. Using BitNet-local wrappers fixes installation behavior without modifying the submodule directly.

Verification

Before

On clean main:

git submodule update --init --recursive
uv venv --python 3.13 --seed .venv-py313
uv pip install --python .venv-py313/bin/python -r requirements.txt

Result:

  • fails on Python 3.13
  • resolver reports that torch~=2.2.1 has no matching cp313 wheels

After

On this branch:

git submodule update --init --recursive
uv venv --python 3.13 --seed .venv-py313
uv pip install --python .venv-py313/bin/python -r requirements.txt

Result:

  • succeeds on Python 3.13
  • resolves torch==2.10.0

Regression check:

uv venv --python 3.12 --seed .venv-py312
uv pip install --python .venv-py312/bin/python -r requirements.txt

Result:

  • still succeeds on Python 3.12
  • resolves torch==2.2.2

Closes #413

@darsh7807
Copy link
Author

@microsoft-github-policy-service agree

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.

Support for Python 3.13

1 participant