szymonrucinski
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -48,11 +48,12 @@ messages = [
|
|
48 |
]
|
49 |
chat_tokenized = tokenizer.apply_chat_template(messages, tokenize=False)
|
50 |
|
51 |
-
model = AutoModelForCausalLM.from_pretrained("szymonrucinski/
|
52 |
model.config.pad_token_id = model.config.eos_token_id
|
53 |
|
54 |
-
tokenizer = AutoTokenizer.from_pretrained("szymonrucinski/
|
55 |
tokenizer.pad_token = tokenizer.eos_token
|
|
|
56 |
|
57 |
beam_outputs = model.generate(
|
58 |
**model_inputs,
|
@@ -62,7 +63,6 @@ beam_outputs = model.generate(
|
|
62 |
num_return_sequences=1,
|
63 |
early_stopping=True
|
64 |
)
|
65 |
-
model_inputs = tokenizer(chat_tokenized, return_tensors='pt').to(torch_device)
|
66 |
print(tokenizer.decode(beam_outputs[0], skip_special_tokens=True))
|
67 |
|
68 |
```
|
|
|
48 |
]
|
49 |
chat_tokenized = tokenizer.apply_chat_template(messages, tokenize=False)
|
50 |
|
51 |
+
model = AutoModelForCausalLM.from_pretrained("szymonrucinski/Krakowiak-7B-v2")
|
52 |
model.config.pad_token_id = model.config.eos_token_id
|
53 |
|
54 |
+
tokenizer = AutoTokenizer.from_pretrained("szymonrucinski/Krakowiak-7B-v2",add_eos_token=True)
|
55 |
tokenizer.pad_token = tokenizer.eos_token
|
56 |
+
model_inputs = tokenizer(chat_tokenized, return_tensors='pt').to(torch_device)
|
57 |
|
58 |
beam_outputs = model.generate(
|
59 |
**model_inputs,
|
|
|
63 |
num_return_sequences=1,
|
64 |
early_stopping=True
|
65 |
)
|
|
|
66 |
print(tokenizer.decode(beam_outputs[0], skip_special_tokens=True))
|
67 |
|
68 |
```
|