Downloads · 30 days
18
2% of all-time downloads
khaimaitien/qa-expert-7B-V1.0
qa-expert-7B-V1.0 is a text generation model from khaimaitien. Use it when you need the model to write or continue text. It is set up for transformers.
This model aims to handle Multi-hop Question answering by splitting a multi-hop questions into a sequence of single questions, handle these single questions then summarize the information to get the final answer. This…
Downloads · 30 days
18
2% of all-time downloads
All-time downloads
1.1K
Public
Parameters
7.2B
57.9 GB on disk
Likes
5
Public
Click a slice to open those files.
.safetensors14.5 GB · 100%
From the Hugging Face model README
This model aims to handle Multi-hop Question answering by splitting a multi-hop questions into a sequence of single questions, handle these single questions then summarize the information to get the final answer.
This model is a fine-tuned version of mistralai/Mistral-7B-v0.1 on the dataset: khaimaitien/qa-expert-multi-hop-qa-V1.0
You can get more information about how to use/train the model from this repo: https://github.com/khaimt/qa_expert
First, you need to clone the repo: https://github.com/khaimt/qa_expert
Then install the requirements:
pip install -r requirements.txt
Here is the example code:
from qa_expert import get_inference_model, InferenceType
def retrieve(query: str) -> str:
# You need to implement this retrieval function, input is a query and output is a string
# This can be treated as the function to call in function calling of OpenAI
return context
model_inference = get_inference_model(InferenceType.hf, "khaimaitien/qa-expert-7B-V1.0")
answer, messages = model_inference.generate_answer(question, retriever_func)