Skip to content

refactor: llguidance#288

Merged
guicho271828 merged 10 commits into
generative-computing:mainfrom
guicho271828:llguidance
Feb 12, 2026
Merged

refactor: llguidance#288
guicho271828 merged 10 commits into
generative-computing:mainfrom
guicho271828:llguidance

Conversation

@guicho271828

Copy link
Copy Markdown
Contributor

No description provided.

@mergify

mergify Bot commented Jan 6, 2026

Copy link
Copy Markdown

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)(?:\(.+\))?:

@guicho271828 guicho271828 changed the title Llguidance refactor: llguidance Jan 6, 2026

@jakelorocco jakelorocco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like there's some mypy errors as well.

Comment thread mellea/backends/vllm.py Outdated
Comment thread mellea/backends/vllm.py Outdated
Comment thread mellea/backends/huggingface.py Outdated
@guicho271828

Copy link
Copy Markdown
Contributor Author

Looks like there's some mypy errors as well.

I don't know why there is a mypy error. Mypy passes locally for me.

@guicho271828
guicho271828 force-pushed the llguidance branch 2 times, most recently from 3ebb8bd to 8dce1f2 Compare January 7, 2026 19:29
@nrfulton

nrfulton commented Jan 7, 2026

Copy link
Copy Markdown
Member

Looks like there's some mypy errors as well.

I don't know why there is a mypy error. Mypy passes locally for me.

We've seen this happen recently and it came down to mypy versions. Could be the cause. I re-ran the checks on the latest branch. If those still fail and you still pass with mypy, try checking your mypy version.

@guicho271828

Copy link
Copy Markdown
Contributor Author

With an updated lockfile the mypy passes. Test is terminated but locally it is passing. If you approve, I will merge this

@jakelorocco jakelorocco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@guicho271828, can you remind me if we ever got the local vllm backend running on mac (or if you remember a discussion about that)?

I tried installing this version of the mellea package on my mac and was getting versioning errors.

Details

(mellea) ➜  mellea git:(pr/guicho271828/288) uv pip install -e '.[all]' --all-extras --group dev -r pyproject.toml
Using Python 3.12.0 environment at: /opt/homebrew/Caskroom/miniforge/base/envs/mellea
  × No solution found when resolving dependencies:
  ╰─▶ Because only the following versions of nvidia-cudnn-frontend are available:
          nvidia-cudnn-frontend<=1.13.0
          nvidia-cudnn-frontend==1.14.0
          nvidia-cudnn-frontend==1.14.1
          nvidia-cudnn-frontend==1.15.0
          nvidia-cudnn-frontend==1.16.0
          nvidia-cudnn-frontend==1.17.0
      and nvidia-cudnn-frontend>=1.13.0 has no wheels with a matching platform tag (e.g., `macosx_15_0_arm64`), we can conclude that
      nvidia-cudnn-frontend>=1.13.0 cannot be used.
      And because flashinfer-python==0.5.3 depends on nvidia-cudnn-frontend>=1.13.0 and vllm==0.13.0 depends on flashinfer-python==0.5.3, we
      can conclude that vllm==0.13.0 cannot be used.
      And because only vllm<=0.13.0 is available and mellea depends on vllm>=0.13.0, we can conclude that your requirements are
      unsatisfiable.

It looks like the newest version I can install on a mac is 0.11.0.

The vllm engine can't seem to get enough resources to run locally on my mac anyways, so maybe we can just add a note somewhere that "mella[vllm]" doesn't work for macs?

@guicho271828

Copy link
Copy Markdown
Contributor Author

@guicho271828, can you remind me if we ever got the local vllm backend running on mac (or if you remember a discussion about that)?

I tried installing this version of the mellea package on my mac and was getting versioning errors.
Details

The vllm engine can't seem to get enough resources to run locally on my mac anyways, so maybe we can just add a note somewhere that "mella[vllm]" doesn't work for macs?

To run vllm locally, vllm assumes

NVIDIA GPUs, AMD CPUs and GPUs, Intel CPUs and GPUs, PowerPC CPUs, and TPU

So yes mella[vllm] does not work on Mac.

@guicho271828

Copy link
Copy Markdown
Contributor Author

@guicho271828, can you remind me if we ever got the local vllm backend running on mac (or if you remember a discussion about that)?

I tried installing this version of the mellea package on my mac and was getting versioning errors.
Details

(mellea) ➜  mellea git:(pr/guicho271828/288) uv pip install -e '.[all]' --all-extras --group dev -r pyproject.toml
Using Python 3.12.0 environment at: /opt/homebrew/Caskroom/miniforge/base/envs/mellea
  × No solution found when resolving dependencies:
  ╰─▶ Because only the following versions of nvidia-cudnn-frontend are available:
          nvidia-cudnn-frontend<=1.13.0
          nvidia-cudnn-frontend==1.14.0
          nvidia-cudnn-frontend==1.14.1
          nvidia-cudnn-frontend==1.15.0
          nvidia-cudnn-frontend==1.16.0
          nvidia-cudnn-frontend==1.17.0
      and nvidia-cudnn-frontend>=1.13.0 has no wheels with a matching platform tag (e.g., `macosx_15_0_arm64`), we can conclude that
      nvidia-cudnn-frontend>=1.13.0 cannot be used.
      And because flashinfer-python==0.5.3 depends on nvidia-cudnn-frontend>=1.13.0 and vllm==0.13.0 depends on flashinfer-python==0.5.3, we
      can conclude that vllm==0.13.0 cannot be used.
      And because only vllm<=0.13.0 is available and mellea depends on vllm>=0.13.0, we can conclude that your requirements are
      unsatisfiable.

It looks like the newest version I can install on a mac is 0.11.0.

The vllm engine can't seem to get enough resources to run locally on my mac anyways, so maybe we can just add a note somewhere that "mella[vllm]" doesn't work for macs?

29588fb disables installing vllm on darwin.

Comment thread mellea/backends/vllm.py Outdated
Comment thread test/backends/test_vllm_tools.py
@guicho271828
guicho271828 force-pushed the llguidance branch 4 times, most recently from 27a9159 to 91a9e1a Compare February 11, 2026 13:25

@jakelorocco jakelorocco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please also confirm that the huggingface / vllm tests run with the most recent changes.

Comment thread test/backends/test_huggingface.py Outdated
Comment thread test/backends/test_huggingface_tools.py Outdated
Comment thread docs/kv_smash/kvcache.py
device = torch.device("mps")
model = AutoModelForCausalLM.from_pretrained(model_id).to(device)
model = AutoModelForCausalLM.from_pretrained(model_id)
# model = model.to(device=device) # this part does not pass mypy; possible misconfiguration

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remove?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This code does not pass mypy and this error existed from before, it is not written by me.
Annoyingly, without fixing this, I cannot commit any changes with pre-commit enabled, especially because now all code in docs/ are also checked by pre-commit.

Comment thread mellea/core/backend.py Outdated
@guicho271828
guicho271828 force-pushed the llguidance branch 3 times, most recently from d3c9044 to 81ee868 Compare February 11, 2026 22:44
@guicho271828

guicho271828 commented Feb 11, 2026

Copy link
Copy Markdown
Contributor Author

Two huggingface tests failed which are out of scope of this PR.

FAILED test/backends/test_huggingface.py::test_format - AssertionError: The email address should be at example.com

-> structured output failure due to a weak model

FAILED test/backends/test_huggingface.py::test_error_during_generate_with_lock - AssertionError: Regex pattern did not match.

-> test for error handling, discussed in #432
-> this must be addressed in all backends

One vllm test failed.

FAILED test/backends/test_vllm.py::test_generate_from_raw_with_format - AssertionError: formatting directive failed for {

-> structured output failure due to a weak model

@jakelorocco jakelorocco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm!

@guicho271828
guicho271828 added this pull request to the merge queue Feb 12, 2026
Merged via the queue into generative-computing:main with commit 6205b36 Feb 12, 2026
4 checks passed
@guicho271828
guicho271828 deleted the llguidance branch February 12, 2026 19:33
akihikokuroda pushed a commit to akihikokuroda/mellea that referenced this pull request May 27, 2026
* fix(conda): conda should not always supersede mamba

* fix(conda): fixed existing conda environment detection; fails if there is any env name with "mellea"

* refactor: outlines -> llguidance on vllm/hf, vllm 0.13, V1 API, disable vllm on osx

* fix: revert BaseModelSubclass default value

* fix: removed unused Generic from ReactInitiator

* fix(docs): pass docs/kv_smash/kvcache.py

* fixup! fix: revert BaseModelSubclass default value

* fixup! refactor: outlines -> llguidance on vllm/hf, vllm 0.13, V1 API, disable vllm on osx

* fixup! refactor: outlines -> llguidance on vllm/hf, vllm 0.13, V1 API, disable vllm on osx

* fixup! refactor: outlines -> llguidance on vllm/hf, vllm 0.13, V1 API, disable vllm on osx
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