Update README.md
Browse files
README.md
CHANGED
@@ -23,6 +23,10 @@ You can use the following code to run inference with the model. The model is sav
|
|
23 |
import torch
|
24 |
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
|
25 |
|
|
|
|
|
|
|
|
|
26 |
model_name = 'moxin-org/moxin-7b'
|
27 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
28 |
model = AutoModelForCausalLM.from_pretrained(
|
@@ -45,7 +49,7 @@ prompt = "Can you explain the concept of regularization in machine learning?"
|
|
45 |
sequences = pipe(
|
46 |
prompt,
|
47 |
do_sample=True,
|
48 |
-
max_new_tokens=
|
49 |
temperature=0.7,
|
50 |
top_k=50,
|
51 |
top_p=0.95,
|
|
|
23 |
import torch
|
24 |
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
|
25 |
|
26 |
+
torch.backends.cuda.enable_mem_efficient_sdp(False)
|
27 |
+
torch.backends.cuda.enable_flash_sdp(False)
|
28 |
+
|
29 |
+
|
30 |
model_name = 'moxin-org/moxin-7b'
|
31 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
32 |
model = AutoModelForCausalLM.from_pretrained(
|
|
|
49 |
sequences = pipe(
|
50 |
prompt,
|
51 |
do_sample=True,
|
52 |
+
max_new_tokens=1000,
|
53 |
temperature=0.7,
|
54 |
top_k=50,
|
55 |
top_p=0.95,
|