Instructions to use waddledee/three-line-summarization-ja with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use waddledee/three-line-summarization-ja with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("elyza/ELYZA-japanese-Llama-2-7b-instruct") model = PeftModel.from_pretrained(base_model, "waddledee/three-line-summarization-ja") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -52,7 +52,7 @@ def gen(text, model):
|
|
| 52 |
入力文:
|
| 53 |
{text} [/INST] [R_START]
|
| 54 |
"""
|
| 55 |
-
token_ids = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt")
|
| 56 |
token_ids.to("cuda")
|
| 57 |
|
| 58 |
with torch.no_grad():
|
|
|
|
| 52 |
入力文:
|
| 53 |
{text} [/INST] [R_START]
|
| 54 |
"""
|
| 55 |
+
token_ids = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt", truncation=True, max_length=4096)
|
| 56 |
token_ids.to("cuda")
|
| 57 |
|
| 58 |
with torch.no_grad():
|