alex-abb commited on
Commit
d045c7b
·
verified ·
1 Parent(s): 54f14f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,13 +1,13 @@
1
  import gradio as gr
2
  import spaces
3
  from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
4
- from megatron import TransformerModel
 
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