Spaces:
Runtime error
Runtime error
Use the backpack model under stanfordnlp
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import gradio as gr
|
|
6 |
|
7 |
# Build model & get some layers
|
8 |
tokenizer = transformers.AutoTokenizer.from_pretrained('gpt2')
|
9 |
-
m = AutoModelForCausalLM.from_pretrained("
|
10 |
m.eval()
|
11 |
|
12 |
lm_head = m.get_lm_head() # (V, d)
|
|
|
6 |
|
7 |
# Build model & get some layers
|
8 |
tokenizer = transformers.AutoTokenizer.from_pretrained('gpt2')
|
9 |
+
m = AutoModelForCausalLM.from_pretrained("stanfordnlp/backpack-gpt2", trust_remote_code=True)
|
10 |
m.eval()
|
11 |
|
12 |
lm_head = m.get_lm_head() # (V, d)
|