Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LogitsWarper deprecated in upstream transformers #6703

Open
1 task done
lucyknada opened this issue Jan 26, 2025 · 1 comment
Open
1 task done

LogitsWarper deprecated in upstream transformers #6703

lucyknada opened this issue Jan 26, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@lucyknada
Copy link

Describe the bug

see: huggingface/transformers#32626

Is there an existing issue for this?

  • I have searched the existing issues

Reproduction

  1. install transformers from git
  2. try running ooba

Screenshot

No response

Logs

│ /workspace/text-generation-webui/server.py:40 in <module>                                                                                                                                                                                                                  │
│                                                                                                                                                                                                                                                                            │
│    39 import modules.extensions as extensions_module                                                                                                                                                                                                                       │
│ ❱  40 from modules import (                                                                                                                                                                                                                                                │
│    41     chat,                                                                                                                                                                                                                                                            │
│                                                                                                                                                                                                                                                                            │
│ /workspace/text-generation-webui/modules/chat.py:26 in <module>                                                                                                                                                                                                            │
│                                                                                                                                                                                                                                                                            │
│     25 from modules.logging_colors import logger                                                                                                                                                                                                                           │
│ ❱   26 from modules.text_generation import (                                                                                                                                                                                                                               │
│     27     generate_reply,                                                                                                                                                                                                                                                 │
│                                                                                                                                                                                                                                                                            │
│ /workspace/text-generation-webui/modules/text_generation.py:19 in <module>                                                                                                                                                                                                 │
│                                                                                                                                                                                                                                                                            │
│    18 import modules.shared as shared                                                                                                                                                                                                                                      │
│ ❱  19 from modules import models, sampler_hijack                                                                                                                                                                                                                           │
│    20 from modules.cache_utils import process_llamacpp_cache                                                                                                                                                                                                               │
│                                                                                                                                                                                                                                                                            │
│ /workspace/text-generation-webui/modules/sampler_hijack.py:8 in <module>                                                                                                                                                                                                   │
│                                                                                                                                                                                                                                                                            │
│     7 import transformers                                                                                                                                                                                                                                                  │
│ ❱   8 from transformers import LogitsWarper                                                                                                                                                                                                                                │
│     9 from transformers.generation.logits_process import (                                                                                                                                                                                                                 │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
ImportError: cannot import name 'LogitsWarper' from 'transformers' (/workspace/text-generation-webui/installer_files/env/lib/python3.11/site-packages/transformers/__init__.py)

System Info

ubuntu 22.04
@lucyknada lucyknada added the bug Something isn't working label Jan 26, 2025
@MikeRoz47
Copy link

Seems like you can replace the references to LogitsWarper in modules/sampler_hijack.py with LogitsProcessor with no issues (though I've only tested exl2 inference so far).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants