Instructions to use DISLab/SummLlama3.2-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DISLab/SummLlama3.2-3B with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "summarization" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("summarization", model="DISLab/SummLlama3.2-3B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DISLab/SummLlama3.2-3B") model = AutoModelForCausalLM.from_pretrained("DISLab/SummLlama3.2-3B") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -58,7 +58,7 @@ We recommend to use the prompt below to get the summary, since we trained the mo
|
|
| 58 |
|
| 59 |
```
|
| 60 |
def format_chat_template(document):
|
| 61 |
-
instruction = "Please summarize the input
|
| 62 |
row_json = [{"role": "user", "content": f"Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Input:\n{document}\n\n### Response:\n"}]
|
| 63 |
return tokenizer.apply_chat_template(row_json, tokenize=False)
|
| 64 |
```
|
|
|
|
| 58 |
|
| 59 |
```
|
| 60 |
def format_chat_template(document):
|
| 61 |
+
instruction = "Please summarize the input document."
|
| 62 |
row_json = [{"role": "user", "content": f"Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Input:\n{document}\n\n### Response:\n"}]
|
| 63 |
return tokenizer.apply_chat_template(row_json, tokenize=False)
|
| 64 |
```
|