You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not mentioned anywhere that tokenizer is a mandatory argument both in documentation and code
To Reproduce
I use the python script example shared in the documentation:
from QEfficient import QEFFAutoModelForCausalLM
# Initialize the model using from_pretrained similar to transformers.AutoModelForCausalLM
model = QEFFAutoModelForCausalLM.from_pretrained("gpt2")
# Now you can directly compile the model for Cloud AI 100
model.compile(num_cores=14, device_group=[0]) # Considering you have a Cloud AI 100 Standard SKU
# You can now execute the model
model.generate(prompts=["Hi there!!"])
Expected behavior
I made the code work by making the following changes:
from QEfficient import QEFFAutoModelForCausalLM
from QEfficient.utils import load_hf_tokenizer
# Initialize the model using from_pretrained similar to transformers.AutoModelForCausalLM
model = QEFFAutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.2-1B-Instruct")
# Now you can directly compile the model for Cloud AI 100
model.compile(num_cores=16) # Considering you have a Cloud AI 100 Standard SKU
tokenizer = load_hf_tokenizer(
pretrained_model_name_or_path="meta-llama/Llama-3.2-1B-Instruct"
)
# You can now execute the model
model.generate(prompts=["Hi there!!"],tokenizer=tokenizer)
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
OS: [e.g. iOS]
Environment details with packages version etc.
Version/Branch/Commit ID [e.g. 22]
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Hi @quic-shagun we recently updated the compile and generate functions but missed updating the example scripts. Thanks for pointing this out. We will get it updated shortly.
Describe the bug
I was trying to use the high level APIs of QEff to integrate LLM into my application using the documentation here: https://quic.github.io/efficient-transformers/source/hl_api.html#qeffautomodelforcausallm
Platform and Apps SDK: 1.18.3.18
I got the following errors:
It's not mentioned anywhere that tokenizer is a mandatory argument both in documentation and code
To Reproduce
I use the python script example shared in the documentation:
Expected behavior
I made the code work by making the following changes:
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: