maayanorner
commited on
Commit
•
02e51db
1
Parent(s):
4d5f82a
Update README.md
Browse files
README.md
CHANGED
@@ -14,6 +14,8 @@ https://huggingface.co/maayanorner/hebrew-summarization-llm-4bit
|
|
14 |
https://github.com/IAHLT/summarization_he
|
15 |
|
16 |
|
|
|
|
|
17 |
```# install bitsandbytes>=0.41.3 to quantize
|
18 |
import torch
|
19 |
from transformers import (
|
@@ -64,7 +66,6 @@ def summarize_batch(texts, tokenizer, model, num_beams=4, temperature=1, max_new
|
|
64 |
eos_token_id=tokenizer.eos_token_id
|
65 |
)
|
66 |
|
67 |
-
# Decode each generated summary
|
68 |
generated_texts = [tokenizer.decode(output, skip_special_tokens=False) for output in output_ids]
|
69 |
|
70 |
return generated_texts
|
|
|
14 |
https://github.com/IAHLT/summarization_he
|
15 |
|
16 |
|
17 |
+
# Example of usage:
|
18 |
+
**To use 4-bit version, set model_path to maayanorner/hebrew-summarization-llm-4bit**
|
19 |
```# install bitsandbytes>=0.41.3 to quantize
|
20 |
import torch
|
21 |
from transformers import (
|
|
|
66 |
eos_token_id=tokenizer.eos_token_id
|
67 |
)
|
68 |
|
|
|
69 |
generated_texts = [tokenizer.decode(output, skip_special_tokens=False) for output in output_ids]
|
70 |
|
71 |
return generated_texts
|