Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,8 +10,8 @@ from mamba_ssm.models.mixer_seq_simple import MambaLMHeadModel
|
|
10 |
|
11 |
device = "cuda"
|
12 |
tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neox-20b")
|
13 |
-
model = MambaLMHeadModel.from_pretrained("state-spaces/mamba-2.8b", device=device, dtype=torch.float16)
|
14 |
-
genlen =
|
15 |
|
16 |
def pred(text_in,):
|
17 |
tokens = tokenizer(text_in, return_tensors="pt")
|
@@ -25,8 +25,7 @@ def pred(text_in,):
|
|
25 |
return_dict_in_generate=True,
|
26 |
output_scores=True,
|
27 |
enable_timing=False,
|
28 |
-
temperature=0.
|
29 |
-
top_k=10,
|
30 |
top_p=0.9,
|
31 |
)
|
32 |
out = fn()
|
|
|
10 |
|
11 |
device = "cuda"
|
12 |
tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neox-20b")
|
13 |
+
model = MambaLMHeadModel.from_pretrained("state-spaces/mamba-2.8b-slimpj", device=device, dtype=torch.float16)
|
14 |
+
genlen = 500
|
15 |
|
16 |
def pred(text_in,):
|
17 |
tokens = tokenizer(text_in, return_tensors="pt")
|
|
|
25 |
return_dict_in_generate=True,
|
26 |
output_scores=True,
|
27 |
enable_timing=False,
|
28 |
+
temperature=0.7,
|
|
|
29 |
top_p=0.9,
|
30 |
)
|
31 |
out = fn()
|