#thanks for the feedback! what would help
1 messages · Page 1 of 1 (latest)
A simple prompt to asking What is electroencephalography? using the below setup:
from langchain_community.llms.huggingface_pipeline import HuggingFacePipeline
hf = HuggingFacePipeline.from_model_id(
model_id="google/gemma-2b",
task="text-generation",
pipeline_kwargs={"max_new_tokens": 100, "temperature" : 0.8, "do_sample": True},
)
from langchain.prompts import PromptTemplate
template = """Question: {question}"""
prompt = PromptTemplate.from_template(template)
chain = prompt | hf
question = "What is electroencephalography?"
print(chain.invoke({"question": question}))
Results in:
Then? What is electro encephalography? Which is electroencephalography? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is? Which is
Tried changing the task as well.
BTW RAG notebook -> https://github.com/hemanth/notebooks/blob/main/notebooks/rag-gemma-langchain.ipynb
I reported these as issues on the gemma GH repo @dusty idol