Open bitmman opened 11 months ago
Hi there, thanks for reaching out! Please see our answer to this related issue #9
In short, the <|im_start|>
and <|im_end|>
format was used for our finetuned models (not released yet) only. For the base model, you can apply in-context learning by providing the model with several demonstrations. Or, you can follow the one-shot example we mentioned in our deployment doc here if you are doing chat-based prompting.
In addition, the 70B model yields much better results. In our paper, you can see the performance comparisons we reported for in-context learning.
Hope this helps answer your question.
Hi, thanks for your prompt answer. I experimented with providing one-shot example. It sometimes works fine but sometimes not. Here is my example prompt:
You are an expert in identifying risk factors for diseases. Answer the question in a concise way. I'll show you an example, and you resond in a similar way. ### USER: What are the risk factors for lung cancer? ### Assistant: Smoking Exposure to Radon Gas Exposure to Asbestos and Other Carcinogens Family History of Lung Cancer Personal History of Lung Disease Air Pollution Radiation Therapy to the Chest Age ### USER: What are the risk factors for CKD? ### Assistant:
It returns
### USER: What are the risk factors for CKD? ### Assistant: Smoking Diabetes High Blood Pressure Family History of Kidney Disease Personal History of Kidney Disease Obesity Age Race Sex Socioeconomic Status Exposure to Heavy Metals Exposure to Pesticides Exposure to Herbicides Exposure to Chemicals Exposure to Radiation Exposure to Heavy Metals Exposure to Pesticides Exposure to Herbicides Exposure to Chemicals Exposure to Radiation Age Race Sex Socioeconomic Status Exposure to Heavy Metals
It seems okay, but for the next questionquery = "What are the risk factors for breast cancer?"
using the same prompt, I got
### USER: What are the risk factors for prostate cancer? ### Assistant: Age Family History of Prostate Cancer Race Personal History of Prostate Disease Exposure to Radiation Exposure to Chemicals Obesity Smoking Alcohol Diet Family History of Other Cancers Family History of Breast Cancer Family History of Colorectal Cancer Family History of Lung Cancer Family History of Ovarian Cancer Family History of Pancreatic Cancer Family History of Prostate Cancer Family History of Stomach Cancer Family History of Thyroid Cancer Family History of Uterine Cancer Family History of Uterine Cancer Family History of Uterine Cancer
It keeps repeating itself. Any suggestions to improve the performance? I appreciate your help.
Additionally, the model often spits back what I input. Do you have any idea how to avoid this kind of issue? Thanks.
I am also encountering this issue. Sometimes the model also returns the same question and refuses to answer the question in the one-shot format above.
I've been experimenting with Meditron-7b for answering medical queries, but its performance seems not as expected compared to other LLM models.
I loaded the model and tokenizer and then used the standard HF pipeline:
Then I used langchain wrapper:
For a simple greeting with
llm(prompt="Hi, how are you?")
, the model repetitively echoed the prompt:When asked about lung cancer risk factors with
llm(prompt="What are the risk factors for lung cancer?")
,, it provided a list of related questions instead of direct answers:Further, using a formatted prompt based on a GitHub repository example, the response included the prompt format instructions verbatim, without addressing the medical query.
And this returned
Is this behavior typical for Meditron-7b, or might it be an issue with my prompting technique? Additionally, would Meditron-70b potentially yield better results?