Adding a simple monkey search for Leetcode - Darn LeetMonkey
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ dense_model = SentenceTransformer('sentence-transformers/all-Mpnet-base-v2', dev
|
|
23 |
# Load the quantized Llama 2 model and tokenizer
|
24 |
model_name = "TheBloke/Llama-2-7B-Chat-GPTQ"
|
25 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
26 |
-
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
|
27 |
|
28 |
def search_problems(query, top_k=5):
|
29 |
dense_query = dense_model.encode([query])[0].tolist()
|
|
|
23 |
# Load the quantized Llama 2 model and tokenizer
|
24 |
model_name = "TheBloke/Llama-2-7B-Chat-GPTQ"
|
25 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
26 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", quantization_config={"disable_exllama": True})
|
27 |
|
28 |
def search_problems(query, top_k=5):
|
29 |
dense_query = dense_model.encode([query])[0].tolist()
|