Spaces:
Sleeping
Sleeping
Quentin Fisch
commited on
Commit
•
5327a62
1
Parent(s):
efb5688
feat(model): try mixtral-8x22b-instruct-v0.1
Browse files- confluence_rag.py +5 -2
confluence_rag.py
CHANGED
@@ -87,7 +87,8 @@ def store_vector(all_splits: List[str]) -> VectorStoreRetriever:
|
|
87 |
|
88 |
# Use the HuggingFace distilbert-base-uncased model to embed the text
|
89 |
embeddings_model_url = (
|
90 |
-
"https://api-inference.huggingface.co/models/distilbert-base-uncased"
|
|
|
91 |
)
|
92 |
|
93 |
embeddings = HuggingFaceInferenceAPIEmbeddings(
|
@@ -138,13 +139,15 @@ def generate_rag_chain(retriever: VectorStoreRetriever = None) -> RunnableSequen
|
|
138 |
"""
|
139 |
# Use the Mistral Free prototype API
|
140 |
mistral_url = (
|
141 |
-
"https://api-inference.huggingface.co/models/mistralai/Mistral-7B-Instruct-v0.2"
|
|
|
142 |
)
|
143 |
|
144 |
model_endpoint = HuggingFaceEndpoint(
|
145 |
endpoint_url=mistral_url,
|
146 |
huggingfacehub_api_token=HF_API_KEY,
|
147 |
task="text2text-generation",
|
|
|
148 |
)
|
149 |
|
150 |
# Use a custom output parser
|
|
|
87 |
|
88 |
# Use the HuggingFace distilbert-base-uncased model to embed the text
|
89 |
embeddings_model_url = (
|
90 |
+
# "https://api-inference.huggingface.co/models/distilbert-base-uncased"
|
91 |
+
"https://api-inference.huggingface.co/models/Salesforce/SFR-Embedding-Mistral"
|
92 |
)
|
93 |
|
94 |
embeddings = HuggingFaceInferenceAPIEmbeddings(
|
|
|
139 |
"""
|
140 |
# Use the Mistral Free prototype API
|
141 |
mistral_url = (
|
142 |
+
# "https://api-inference.huggingface.co/models/mistralai/Mistral-7B-Instruct-v0.2"
|
143 |
+
"https://api-inference.huggingface.co/models/mistralai/Mixtral-8x22B-Instruct-v0.1"
|
144 |
)
|
145 |
|
146 |
model_endpoint = HuggingFaceEndpoint(
|
147 |
endpoint_url=mistral_url,
|
148 |
huggingfacehub_api_token=HF_API_KEY,
|
149 |
task="text2text-generation",
|
150 |
+
max_new_tokens=1024
|
151 |
)
|
152 |
|
153 |
# Use a custom output parser
|