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

'activation_ops' circular import #5

Closed
sigmareaver opened this issue Jul 17, 2023 · 3 comments
Closed

'activation_ops' circular import #5

sigmareaver opened this issue Jul 17, 2023 · 3 comments

Comments

@sigmareaver
Copy link

sigmareaver commented Jul 17, 2023

Attempted to run the example code in the README.md.
Model: Metharme-13b-GPTQ

Traceback (most recent call last):
  File "/mnt/Storage/ai-dev/aphrodite-engine/inference_test.py", line 1, in <module>
    from aphrodite import LLM, SamplingParams
  File "/mnt/Storage/ai-dev/aphrodite-engine/aphrodite/__init__.py", line 2, in <module>
    from aphrodite.engine.async_aphrodite import AsyncAphrodite
  File "/mnt/Storage/ai-dev/aphrodite-engine/aphrodite/engine/async_aphrodite.py", line 7, in <module>
    from aphrodite.engine.aphrodite_engine import AphroditeEngine
  File "/mnt/Storage/ai-dev/aphrodite-engine/aphrodite/engine/aphrodite_engine.py", line 14, in <module>
    from aphrodite.task_handler.worker import Worker
  File "/mnt/Storage/ai-dev/aphrodite-engine/aphrodite/task_handler/worker.py", line 5, in <module>
    from aphrodite.modeling import get_model, InputMetadata, set_random_seed
  File "/mnt/Storage/ai-dev/aphrodite-engine/aphrodite/modeling/__init__.py", line 2, in <module>
    from aphrodite.modeling.loader import get_model
  File "/mnt/Storage/ai-dev/aphrodite-engine/aphrodite/modeling/loader.py", line 7, in <module>
    from aphrodite.modeling.models import LlamaForCausalLM, GPTJForCausalLM, GPTNeoXForCausalLM
  File "/mnt/Storage/ai-dev/aphrodite-engine/aphrodite/modeling/models/__init__.py", line 1, in <module>
    from aphrodite.modeling.models.llama import LlamaForCausalLM
  File "/mnt/Storage/ai-dev/aphrodite-engine/aphrodite/modeling/models/llama.py", line 33, in <module>
    from aphrodite.modeling.layers.activation import SiluAndMul
  File "/mnt/Storage/ai-dev/aphrodite-engine/aphrodite/modeling/layers/activation.py", line 4, in <module>
    from aphrodite import activation_ops
ImportError: cannot import name 'activation_ops' from partially initialized module 'aphrodite' (most likely due to a circular import) (/mnt/Storage/ai-dev/aphrodite-engine/aphrodite/__init__.py)
@AlpinDale
Copy link
Member

Did you forget to install Aphrodite with pip install -e .? Another thing to note is that GPTQ models are not supported - only 16-bit HuggingFace weights. I'll update the README to explicitly men5ion that.

@sigmareaver
Copy link
Author

sigmareaver commented Jul 17, 2023

Ah, okay.

Retested with RedPajama-INCITE-Base-3B-v1 but the error persists.

@sigmareaver
Copy link
Author

User error. Did pip install e . instead of pip install -e .

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

No branches or pull requests

2 participants