-
Notifications
You must be signed in to change notification settings - Fork 189
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
None of examples on README page works #1117
Comments
Hi @olegmikul, For the INT4 Inference issue, please execute |
hi, @lvliang-intel, Thanks, it is partially helps: I. Chatbot
II. Inference int* same error everywhere:
|
I have just tried the "INT4 Inference (CPU only)" example. if it is the first run (no runtime_outs/ne_mistral_q_nf4_jblas_cfp32_g32.bin generated). in the later runs, the model_name works ok. I wandor if this is supposed behavior. |
Yes, for Intel/neural-chat-7b-v3-1, we need first download the model to disk, then pass local path to us. And we will support them without use local path soon. |
Hi, @Tuanshu, Thanks, it works! Read a poem on a little girl that can see :) It would be extremely useful to put necessary details in a README file to avoid questions from newcomers, like me. Chatbot issues are remaining, though... |
Same errors on 3 different Linux distros.
I have installed from source:
pushd intel-extension-for-transformers/
pip install -r requirements.txt
python setup.py install
Then start to try examples from README (obviously, my first steps after install):
pip install uvicorn
pip install yacs
pip install fastapi
pip install shortuuid
pip install python-multipart
pip install python-dotenv
And finally got the following error:
from intel_extension_for_transformers.neural_chat import build_chatbot
PydanticImportError:
BaseSettings
has been moved to thepydantic-settings
package. See https://docs.pydantic.dev/2.5/migration/#basesettings-has-moved-to-pydantic-settings for more details.from transformers import AutoTokenizer, TextStreamer
from intel_extension_for_transformers.transformers import AutoModelForCausalLM
model_name = "Intel/neural-chat-7b-v3-1" # Hugging Face model_id or local model
prompt = "Once upon a time, there existed a little girl,"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
inputs = tokenizer(prompt, return_tensors="pt").input_ids
streamer = TextStreamer(tokenizer)
model = AutoModelForCausalLM.from_pretrained(model_name, load_in_4bit=True)
outputs = model.generate(inputs, streamer=streamer, max_new_tokens=300)
ModuleNotFoundError: No module named 'intel_extension_for_transformers.llm.runtime.graph.mistral_cpp'
The text was updated successfully, but these errors were encountered: