Instructions to use RUCAIBox/mtl-summarization with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RUCAIBox/mtl-summarization with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RUCAIBox/mtl-summarization")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("RUCAIBox/mtl-summarization", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use RUCAIBox/mtl-summarization with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RUCAIBox/mtl-summarization" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RUCAIBox/mtl-summarization", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/RUCAIBox/mtl-summarization
- SGLang
How to use RUCAIBox/mtl-summarization with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "RUCAIBox/mtl-summarization" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RUCAIBox/mtl-summarization", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "RUCAIBox/mtl-summarization" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RUCAIBox/mtl-summarization", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use RUCAIBox/mtl-summarization with Docker Model Runner:
docker model run hf.co/RUCAIBox/mtl-summarization
Add evaluation results on the samsum config and test split of samsum
#1
by autoevaluator HF Staff - opened
README.md
CHANGED
|
@@ -8,10 +8,50 @@ tags:
|
|
| 8 |
- summarization
|
| 9 |
pipeline_tag: text2text-generation
|
| 10 |
widget:
|
| 11 |
-
- text:
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
---
|
| 16 |
|
| 17 |
# MTL-summarization
|
|
|
|
| 8 |
- summarization
|
| 9 |
pipeline_tag: text2text-generation
|
| 10 |
widget:
|
| 11 |
+
- text: 'Summarize: You may want to stick it to your boss and leave your job, but
|
| 12 |
+
don''t do it if these are your reasons.'
|
| 13 |
+
example_title: Example1
|
| 14 |
+
- text: 'Summarize: Jorge Alfaro drove in two runs, Aaron Nola pitched seven innings
|
| 15 |
+
of two-hit ball and the Philadelphia Phillies beat the Los Angeles Dodgers 2-1
|
| 16 |
+
Thursday, spoiling Clayton Kershaw''s first start in almost a month. Hitting out
|
| 17 |
+
of the No. 8 spot in the ...'
|
| 18 |
+
example_title: Example2
|
| 19 |
+
model-index:
|
| 20 |
+
- name: RUCAIBox/mtl-summarization
|
| 21 |
+
results:
|
| 22 |
+
- task:
|
| 23 |
+
type: summarization
|
| 24 |
+
name: Summarization
|
| 25 |
+
dataset:
|
| 26 |
+
name: samsum
|
| 27 |
+
type: samsum
|
| 28 |
+
config: samsum
|
| 29 |
+
split: test
|
| 30 |
+
metrics:
|
| 31 |
+
- name: ROUGE-1
|
| 32 |
+
type: rouge
|
| 33 |
+
value: 27.3604
|
| 34 |
+
verified: true
|
| 35 |
+
- name: ROUGE-2
|
| 36 |
+
type: rouge
|
| 37 |
+
value: 7.2277
|
| 38 |
+
verified: true
|
| 39 |
+
- name: ROUGE-L
|
| 40 |
+
type: rouge
|
| 41 |
+
value: 22.4688
|
| 42 |
+
verified: true
|
| 43 |
+
- name: ROUGE-LSUM
|
| 44 |
+
type: rouge
|
| 45 |
+
value: 24.6476
|
| 46 |
+
verified: true
|
| 47 |
+
- name: loss
|
| 48 |
+
type: loss
|
| 49 |
+
value: 2.2192304134368896
|
| 50 |
+
verified: true
|
| 51 |
+
- name: gen_len
|
| 52 |
+
type: gen_len
|
| 53 |
+
value: 17.2418
|
| 54 |
+
verified: true
|
| 55 |
---
|
| 56 |
|
| 57 |
# MTL-summarization
|