Skip to content

Conversation

@jakelorocco
Copy link
Contributor

@jakelorocco jakelorocco commented Nov 19, 2025

Changes:

  • added HFGenerationLock so that only one type of generation can be done at once
  • added some tests to ensure this is what happens

Testing:

  • old huggingface tests still pass
  • new huggingface tests pass

@mergify
Copy link

mergify bot commented Nov 19, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|release)(?:\(.+\))?:

@jakelorocco jakelorocco force-pushed the jal/hf-generation-lock branch 3 times, most recently from 4d1385f to eb408e4 Compare November 20, 2025 14:15
@jakelorocco jakelorocco force-pushed the jal/hf-generation-lock branch from eb408e4 to 8d8d683 Compare November 20, 2025 14:20
@jakelorocco jakelorocco marked this pull request as ready for review November 20, 2025 18:47
try:
# We can't know if adapters have been loaded / set previously.
# This call will throw an exception if none have been.
self.backend._model.set_adapter([])
Copy link
Contributor

Choose a reason for hiding this comment

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

@jakelorocco
Copy link
Contributor Author

Closing this PR in favor of a simpler approach. Opening this issue to document future optimizations that can be done to speed up the generation lock for the local huggingface backend if needed. Will leave this branch un-deleted.

If this code is used in the future, we should rename the HFGenerationLock and most of its fields for explainability and understanding.

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.

3 participants