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
Hi, I have tested the performance of Me-LLaMA-13b-chat model on CPU but I ended with the random results. Model is often hallucinated. I have attached the example of the prompt and response below:
Prompt: how to treat flu in home?
Response: how to treat flu in home? How to treat flu in home? What are the home remedies for flu?
I have attached the code snippets below:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_file = "./physionet.org/files/me-llama/1.0.0/MeLLaMA-13B-chat"
tokenizer = AutoTokenizer.from_pretrained(model_file)
model = AutoModelForCausalLM.from_pretrained(model_file)
# Tokenizing input text for the model.
input_ids = tokenizer([prompt], return_tensors="pt").input_ids
# Generating output based on the input_ids.
# You can adjust the max_length parameter as necessary for your use case.
generated_tokens = model.generate(input_ids, max_length=1000)
# Decoding the generated tokens to produce readable text.
generated_text = tokenizer.decode(generated_tokens[0], skip_special_tokens=True)
print(generated_text)
Is that model is that much hallucinated? I have followed github documentation to load and infer the model.Is there are any hack that helps to generate the expected response from the model. Thank you.
The text was updated successfully, but these errors were encountered:
Hi, I have tested the performance of Me-LLaMA-13b-chat model on CPU but I ended with the random results. Model is often hallucinated. I have attached the example of the prompt and response below:
Prompt:
how to treat flu in home?
Response:
how to treat flu in home? How to treat flu in home? What are the home remedies for flu?
I have attached the code snippets below:
Is that model is that much hallucinated? I have followed github documentation to load and infer the model.Is there are any hack that helps to generate the expected response from the model. Thank you.
The text was updated successfully, but these errors were encountered: