Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,7 @@
|
|
|
|
1 |
import transformers
|
2 |
-
from transformers import AutoConfig, AutoTokenizer, AutoModelForCausalLM
|
|
|
3 |
import torch
|
4 |
import gradio as gr
|
5 |
import json
|
@@ -14,7 +16,6 @@ temperature=0.4
|
|
14 |
max_new_tokens=240
|
15 |
top_p=0.92
|
16 |
repetition_penalty=1.7
|
17 |
-
#max_length=2048
|
18 |
|
19 |
model_name = "OpenLLM-France/Claire-7B-0.1"
|
20 |
|
|
|
1 |
+
import optimum
|
2 |
import transformers
|
3 |
+
from transformers import AutoConfig, AutoTokenizer, AutoModel, AutoModelForCausalLM
|
4 |
+
from optimum.bettertransformer import BetterTransformer
|
5 |
import torch
|
6 |
import gradio as gr
|
7 |
import json
|
|
|
16 |
max_new_tokens=240
|
17 |
top_p=0.92
|
18 |
repetition_penalty=1.7
|
|
|
19 |
|
20 |
model_name = "OpenLLM-France/Claire-7B-0.1"
|
21 |
|