update example
Browse files
README.md
CHANGED
@@ -35,14 +35,17 @@ We introduce <strong>Kangaroo</strong>, a powerful Multimodal Large Language Mod
|
|
35 |
import torch
|
36 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
37 |
|
38 |
-
|
|
|
39 |
model = AutoModelForCausalLM.from_pretrained(
|
40 |
-
"
|
41 |
torch_dtype=torch.bfloat16,
|
42 |
trust_remote_code=True,
|
43 |
)
|
44 |
model = model.to("cuda")
|
45 |
terminators = [tokenizer.eos_token_id, tokenizer.convert_tokens_to_ids("<|eot_id|>")]
|
|
|
|
|
46 |
video_path = "/path/to/video"
|
47 |
|
48 |
# Round 1
|
|
|
35 |
import torch
|
36 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
37 |
|
38 |
+
# replace /path/to/kangaroo to your own path to the model
|
39 |
+
tokenizer = AutoTokenizer.from_pretrained("/path/to/kangaroo")
|
40 |
model = AutoModelForCausalLM.from_pretrained(
|
41 |
+
"/path/to/kangaroo",
|
42 |
torch_dtype=torch.bfloat16,
|
43 |
trust_remote_code=True,
|
44 |
)
|
45 |
model = model.to("cuda")
|
46 |
terminators = [tokenizer.eos_token_id, tokenizer.convert_tokens_to_ids("<|eot_id|>")]
|
47 |
+
|
48 |
+
# replace /path/to/kangaroo to your own path to the video
|
49 |
video_path = "/path/to/video"
|
50 |
|
51 |
# Round 1
|