Spaces:
Runtime error
Runtime error
adrien.aribaut-gaudin
commited on
Commit
•
8988c49
1
Parent(s):
871867a
fix: added sqlite in requirements
Browse files- requirements.txt +0 -0
- src/tools/llm.py +1 -1
requirements.txt
CHANGED
Binary files a/requirements.txt and b/requirements.txt differ
|
|
src/tools/llm.py
CHANGED
@@ -8,7 +8,7 @@ class LlmAgent:
|
|
8 |
def __init__(self, model :str = "TheBloke/Llama-2-7b-Chat-GPTQ"):
|
9 |
self.tokenizer = AutoTokenizer.from_pretrained(model, use_fast=True)
|
10 |
self.model = AutoModelForCausalLM.from_pretrained(model,
|
11 |
-
|
12 |
trust_remote_code=False, #A CHANGER SELON LES MODELES, POUR CELUI DE LAMA2 CA MARCHE (celui par default)
|
13 |
revision="main")
|
14 |
self.pipe = pipeline("text-generation", model=self.model, tokenizer=self.tokenizer)
|
|
|
8 |
def __init__(self, model :str = "TheBloke/Llama-2-7b-Chat-GPTQ"):
|
9 |
self.tokenizer = AutoTokenizer.from_pretrained(model, use_fast=True)
|
10 |
self.model = AutoModelForCausalLM.from_pretrained(model,
|
11 |
+
device_map="cuda",
|
12 |
trust_remote_code=False, #A CHANGER SELON LES MODELES, POUR CELUI DE LAMA2 CA MARCHE (celui par default)
|
13 |
revision="main")
|
14 |
self.pipe = pipeline("text-generation", model=self.model, tokenizer=self.tokenizer)
|