Update README.md
Browse files
README.md
CHANGED
@@ -48,13 +48,11 @@ import torch
|
|
48 |
from transformers import AutoModelForCausalLM, AutoTokenizer, AutoConfig,TextStreamer
|
49 |
|
50 |
|
51 |
-
streamer = TextStreamer(tokenizer)
|
52 |
model_id = 'FINGU-AI/FinguAI-Chat-v1'
|
53 |
-
|
54 |
-
|
55 |
-
model.to('cuda')
|
56 |
-
tokenizer = AutoTokenizer.from_pretrained(model_id,)
|
57 |
streamer = TextStreamer(tokenizer)
|
|
|
58 |
|
59 |
|
60 |
|
|
|
48 |
from transformers import AutoModelForCausalLM, AutoTokenizer, AutoConfig,TextStreamer
|
49 |
|
50 |
|
|
|
51 |
model_id = 'FINGU-AI/FinguAI-Chat-v1'
|
52 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, attn_implementation="flash_attention_2", torch_dtype= torch.bfloat16)
|
53 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
|
|
|
|
54 |
streamer = TextStreamer(tokenizer)
|
55 |
+
model.to('cuda')
|
56 |
|
57 |
|
58 |
|