Pavan178 commited on
Commit
93aa5ac
1 Parent(s): 8deaa6a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -28,7 +28,7 @@ import re
28
  list_llm = ["mistralai/Mistral-7B-Instruct-v0.2", "mistralai/Mixtral-8x7B-Instruct-v0.1", "mistralai/Mistral-7B-Instruct-v0.1", \
29
  "google/gemma-7b-it","google/gemma-2b-it", \
30
  "HuggingFaceH4/zephyr-7b-beta", "HuggingFaceH4/zephyr-7b-gemma-v0.1", \
31
- "meta-llama/Meta-Llama-3-8B-Instruct","meta-llama/Meta-Llama-3.1-8B-Instruct", "microsoft/phi-2", \
32
  "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "mosaicml/mpt-7b-instruct", "tiiuae/falcon-7b-instruct", \
33
  "google/flan-t5-xxl"
34
  ]
@@ -152,13 +152,13 @@ def initialize_llmchain(llm_model, temperature, max_tokens, top_k, vector_db, pr
152
  #huggingfacehub_api_token = huggingfacehub_api_token,
153
  top_k = top_k,
154
  )
155
- elif llm_model == "meta-llama/Meta-Llama-3.1-8B-Instruct":
156
  #raise gr.Error("Llama-2-7b-chat-hf model requires a Pro subscription...")
157
  llm = HuggingFaceEndpoint(
158
  repo_id=llm_model,
159
  # model_kwargs={"temperature": temperature, "max_new_tokens": max_tokens, "top_k": top_k}
160
  temperature = temperature,
161
- max_new_tokens = 450,
162
  #huggingfacehub_api_token = huggingfacehub_api_token,
163
  top_k = top_k,
164
  )
 
28
  list_llm = ["mistralai/Mistral-7B-Instruct-v0.2", "mistralai/Mixtral-8x7B-Instruct-v0.1", "mistralai/Mistral-7B-Instruct-v0.1", \
29
  "google/gemma-7b-it","google/gemma-2b-it", \
30
  "HuggingFaceH4/zephyr-7b-beta", "HuggingFaceH4/zephyr-7b-gemma-v0.1", \
31
+ "meta-llama/Meta-Llama-3-8B-Instruct","meta-llama/Meta-Llama-3.1-70B-Instruct", "microsoft/phi-2", \
32
  "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "mosaicml/mpt-7b-instruct", "tiiuae/falcon-7b-instruct", \
33
  "google/flan-t5-xxl"
34
  ]
 
152
  #huggingfacehub_api_token = huggingfacehub_api_token,
153
  top_k = top_k,
154
  )
155
+ elif llm_model == "meta-llama/Meta-Llama-3.1-70B-Instruct":
156
  #raise gr.Error("Llama-2-7b-chat-hf model requires a Pro subscription...")
157
  llm = HuggingFaceEndpoint(
158
  repo_id=llm_model,
159
  # model_kwargs={"temperature": temperature, "max_new_tokens": max_tokens, "top_k": top_k}
160
  temperature = temperature,
161
+ max_new_tokens = 500,
162
  #huggingfacehub_api_token = huggingfacehub_api_token,
163
  top_k = top_k,
164
  )