Instructions to use readerbench/RoSummary-medium with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use readerbench/RoSummary-medium with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="readerbench/RoSummary-medium")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("readerbench/RoSummary-medium") model = AutoModelForCausalLM.from_pretrained("readerbench/RoSummary-medium") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use readerbench/RoSummary-medium with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "readerbench/RoSummary-medium" # 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-medium", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/readerbench/RoSummary-medium
- SGLang
How to use readerbench/RoSummary-medium 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-medium" \ --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-medium", "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-medium" \ --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-medium", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use readerbench/RoSummary-medium with Docker Model Runner:
docker model run hf.co/readerbench/RoSummary-medium
Commit ·
9415d6f
1
Parent(s): b6750ed
Update model
Browse files- config.json +5 -2
- pytorch_model.bin +3 -0
- tf_model.h5 +2 -2
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
| 3 |
"activation_function": "gelu_new",
|
| 4 |
"architectures": [
|
| 5 |
"GPT2LMHeadModel"
|
|
@@ -20,7 +20,10 @@
|
|
| 20 |
"n_positions": 1024,
|
| 21 |
"n_special": 0,
|
| 22 |
"predict_special_tokens": true,
|
|
|
|
| 23 |
"resid_pdrop": 0.1,
|
|
|
|
|
|
|
| 24 |
"summary_activation": null,
|
| 25 |
"summary_first_dropout": 0.1,
|
| 26 |
"summary_proj_to_labels": true,
|
|
@@ -32,7 +35,7 @@
|
|
| 32 |
"max_length": 50
|
| 33 |
}
|
| 34 |
},
|
| 35 |
-
"transformers_version": "4.
|
| 36 |
"use_cache": true,
|
| 37 |
"vocab_size": 50257
|
| 38 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "../../models/summary/model/RoGPT2-medium-best",
|
| 3 |
"activation_function": "gelu_new",
|
| 4 |
"architectures": [
|
| 5 |
"GPT2LMHeadModel"
|
|
|
|
| 20 |
"n_positions": 1024,
|
| 21 |
"n_special": 0,
|
| 22 |
"predict_special_tokens": true,
|
| 23 |
+
"reorder_and_upcast_attn": false,
|
| 24 |
"resid_pdrop": 0.1,
|
| 25 |
+
"scale_attn_by_inverse_layer_idx": false,
|
| 26 |
+
"scale_attn_weights": true,
|
| 27 |
"summary_activation": null,
|
| 28 |
"summary_first_dropout": 0.1,
|
| 29 |
"summary_proj_to_labels": true,
|
|
|
|
| 35 |
"max_length": 50
|
| 36 |
}
|
| 37 |
},
|
| 38 |
+
"transformers_version": "4.20.1",
|
| 39 |
"use_cache": true,
|
| 40 |
"vocab_size": 50257
|
| 41 |
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:28935de4c39ec8b657a14f2058706be7e328f26b224222533b536ca2fb28f8a6
|
| 3 |
+
size 1444562137
|
tf_model.h5
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0fef62f5ec43bc709996b6107d99a57a3c53a92cf92e089357ec44b1bb712ec5
|
| 3 |
+
size 1419648008
|