Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ if not torch.cuda.is_available():
|
|
34 |
|
35 |
|
36 |
if torch.cuda.is_available():
|
37 |
-
model_id = "
|
38 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True)
|
39 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
40 |
tokenizer.use_default_system_prompt = False
|
@@ -46,7 +46,7 @@ def generate(
|
|
46 |
message: str,
|
47 |
chat_history: list[tuple[str, str]],
|
48 |
system_prompt: str,
|
49 |
-
max_new_tokens: int =
|
50 |
temperature: float = 0.6,
|
51 |
top_p: float = 0.9,
|
52 |
top_k: int = 50,
|
|
|
34 |
|
35 |
|
36 |
if torch.cuda.is_available():
|
37 |
+
model_id = "AI-MO/NuminaMath-7B-TIR"
|
38 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True)
|
39 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
40 |
tokenizer.use_default_system_prompt = False
|
|
|
46 |
message: str,
|
47 |
chat_history: list[tuple[str, str]],
|
48 |
system_prompt: str,
|
49 |
+
max_new_tokens: int = 2048,
|
50 |
temperature: float = 0.6,
|
51 |
top_p: float = 0.9,
|
52 |
top_k: int = 50,
|