Spaces:
Running
Running
Clement Vachet
commited on
Commit
·
29dd1a2
1
Parent(s):
ed908d9
Add inference provider
Browse files- retrieval.py +8 -0
retrieval.py
CHANGED
@@ -40,9 +40,17 @@ def initialize_llmchain(
|
|
40 |
# Warning: langchain issue
|
41 |
# URL: https://github.com/langchain-ai/langchain/issues/6080
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
llm = HuggingFaceEndpoint(
|
44 |
repo_id=llm_model,
|
45 |
task="text-generation",
|
|
|
|
|
46 |
temperature=temperature,
|
47 |
max_new_tokens=max_tokens,
|
48 |
top_k=top_k,
|
|
|
40 |
# Warning: langchain issue
|
41 |
# URL: https://github.com/langchain-ai/langchain/issues/6080
|
42 |
|
43 |
+
# if 'Llama' in llm_model:
|
44 |
+
# task = "conversational"
|
45 |
+
# else:
|
46 |
+
# task = "text-generation"
|
47 |
+
# print(f"Task: {task}")
|
48 |
+
|
49 |
llm = HuggingFaceEndpoint(
|
50 |
repo_id=llm_model,
|
51 |
task="text-generation",
|
52 |
+
#task="conversational",
|
53 |
+
provider="hf-inference",
|
54 |
temperature=temperature,
|
55 |
max_new_tokens=max_tokens,
|
56 |
top_k=top_k,
|