Instructions to use readerbench/RoSummary-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use readerbench/RoSummary-large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="readerbench/RoSummary-large")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("readerbench/RoSummary-large") model = AutoModelForCausalLM.from_pretrained("readerbench/RoSummary-large") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use readerbench/RoSummary-large with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "readerbench/RoSummary-large" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "readerbench/RoSummary-large", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/readerbench/RoSummary-large
- SGLang
How to use readerbench/RoSummary-large 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 "readerbench/RoSummary-large" \ --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": "readerbench/RoSummary-large", "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 "readerbench/RoSummary-large" \ --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": "readerbench/RoSummary-large", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use readerbench/RoSummary-large with Docker Model Runner:
docker model run hf.co/readerbench/RoSummary-large
Commit ·
aebd92a
1
Parent(s): 7fe9188
Update README.md
Browse files
README.md
CHANGED
|
@@ -7,6 +7,28 @@ language:
|
|
| 7 |
|
| 8 |
# RoSummary
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
## Acknowledgments
|
| 12 |
|
|
|
|
| 7 |
|
| 8 |
# RoSummary
|
| 9 |
|
| 10 |
+
This is a version of the RoGPT2 model trained on the [AlephNews](https://huggingface.co/datasets/readerbench/AlephNews) dataset for the summarization task. There are 3 trained versions, they are available on the HuggingFace Hub:
|
| 11 |
+
* [base](https://huggingface.co/readerbench/RoSummary-base)
|
| 12 |
+
* [medium](https://huggingface.co/readerbench/RoSummary-medium)
|
| 13 |
+
* [large](https://huggingface.co/readerbench/RoSummary-large)
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
## Evaluation on [AlephNews](https://huggingface.co/datasets/readerbench/AlephNews)
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
| Model | Decode Method | | BERTScore | | | ROUGE | |
|
| 20 |
+
|:------:|:--------------:|:---------:|:---------:|:--------:|:--------:|:--------:|:--------:|
|
| 21 |
+
| | | Precision | Recall | F1-Score | ROUGE-1 | ROUGE-2 | ROUGE-L |
|
| 22 |
+
| | Greedy | 0.7335 | 0.7399 | 0.7358 | 0.3360 | 0.1862 | 0.3333 |
|
| 23 |
+
| Base | Beam Search | 0.7354 | 0.7468 | 0.7404 | 0.3480 | 0.1991 | 0.3416 |
|
| 24 |
+
| | Top-p Sampling | 0.7296 | 0.7299 | 0.7292 | 0.3058 | 0.1452 | 0.2951 |
|
| 25 |
+
| | Greedy | 0.7378 | 0.7401 | 0.7380 | 0.3422 | 0.1922 | 0.3394 |
|
| 26 |
+
| Medium | Beam Search | 0.7390 | **0.7493**|**0.7434**|**0.3546**|**0.2061**|**0.3467**|
|
| 27 |
+
| | Top-p Sampling | 0.7315 | 0.7285 | 0.7294 | 0.3042 | 0.1400 | 0.2921 |
|
| 28 |
+
| | Greedy | 0.7376 | 0.7424 | 0.7391 | 0.3414 | 0.1895 | 0.3355 |
|
| 29 |
+
| Large | Beam Search | **0.7394**| 0.7470 | 0.7424 | 0.3492 | 0.1995 | 0.3384 |
|
| 30 |
+
| | Top-p Sampling | 0.7311 | 0.7301 | 0.7299 | 0.3051 | 0.1418 | 0.2931 |
|
| 31 |
+
|
| 32 |
|
| 33 |
## Acknowledgments
|
| 34 |
|