Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
import gradio as gr
|
2 |
import spaces
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
4 |
-
|
|
|
5 |
|
|
|
|
|
6 |
|
7 |
|
8 |
-
tokenizer = AutoTokenizer.from_pretrained("nvidia/mamba2-hybrid-8b-3t-128k")
|
9 |
-
model = TransformerModel.from_pretrained("nvidia/mamba2-hybrid-8b-3t-128k", device_map="auto") # to("cuda:0")
|
10 |
-
|
11 |
|
12 |
|
13 |
# Optionnel : Fixer une graine aléatoire pour la reproductibilit
|
|
|
1 |
import gradio as gr
|
2 |
import spaces
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
4 |
+
# Load model directly
|
5 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
6 |
|
7 |
+
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.3")
|
8 |
+
model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.3")
|
9 |
|
10 |
|
|
|
|
|
|
|
11 |
|
12 |
|
13 |
# Optionnel : Fixer une graine aléatoire pour la reproductibilit
|