Update README.md
Browse files
README.md
CHANGED
@@ -25,7 +25,7 @@ from modeling_bertchunker import BertChunker
|
|
25 |
|
26 |
# load bert tokenizer
|
27 |
tokenizer = AutoTokenizer.from_pretrained(
|
28 |
-
"
|
29 |
padding_side="right",
|
30 |
model_max_length=255,
|
31 |
trust_remote_code=True,
|
@@ -33,7 +33,7 @@ tokenizer = AutoTokenizer.from_pretrained(
|
|
33 |
|
34 |
# load MiniLM-L6-H384-uncased bert config
|
35 |
config = AutoConfig.from_pretrained(
|
36 |
-
"
|
37 |
trust_remote_code=True,
|
38 |
)
|
39 |
|
@@ -42,7 +42,7 @@ model = BertChunker(config)
|
|
42 |
device='cuda'
|
43 |
model.to(device)
|
44 |
|
45 |
-
# load parameters
|
46 |
state_dict = safetensors.torch.load_file("./model.safetensors")
|
47 |
model.load_state_dict(state_dict)
|
48 |
|
|
|
25 |
|
26 |
# load bert tokenizer
|
27 |
tokenizer = AutoTokenizer.from_pretrained(
|
28 |
+
"tim1900/BertChunker",
|
29 |
padding_side="right",
|
30 |
model_max_length=255,
|
31 |
trust_remote_code=True,
|
|
|
33 |
|
34 |
# load MiniLM-L6-H384-uncased bert config
|
35 |
config = AutoConfig.from_pretrained(
|
36 |
+
"tim1900/BertChunker",
|
37 |
trust_remote_code=True,
|
38 |
)
|
39 |
|
|
|
42 |
device='cuda'
|
43 |
model.to(device)
|
44 |
|
45 |
+
# load parameters, tim1900/BertChunker/model.safetensors
|
46 |
state_dict = safetensors.torch.load_file("./model.safetensors")
|
47 |
model.load_state_dict(state_dict)
|
48 |
|