Instructions to use MU-NLPC/CzeGPT-2_summarizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MU-NLPC/CzeGPT-2_summarizer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MU-NLPC/CzeGPT-2_summarizer")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MU-NLPC/CzeGPT-2_summarizer") model = AutoModelForCausalLM.from_pretrained("MU-NLPC/CzeGPT-2_summarizer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MU-NLPC/CzeGPT-2_summarizer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MU-NLPC/CzeGPT-2_summarizer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MU-NLPC/CzeGPT-2_summarizer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MU-NLPC/CzeGPT-2_summarizer
- SGLang
How to use MU-NLPC/CzeGPT-2_summarizer 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 "MU-NLPC/CzeGPT-2_summarizer" \ --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": "MU-NLPC/CzeGPT-2_summarizer", "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 "MU-NLPC/CzeGPT-2_summarizer" \ --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": "MU-NLPC/CzeGPT-2_summarizer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use MU-NLPC/CzeGPT-2_summarizer with Docker Model Runner:
docker model run hf.co/MU-NLPC/CzeGPT-2_summarizer
Update README.md
Browse files
README.md
CHANGED
|
@@ -17,7 +17,7 @@ Along, we also provide a Czech trained tokenizer (vocab and merges) with vocab s
|
|
| 17 |
The model was evaluated on the *test* and *ood-test* partitions of the SumeCzech dataset and compared to the best summarizers yet evaluated on this benchmark (the results taken from <a href="https://ufal.mff.cuni.cz/sumeczech">here</a>).
|
| 18 |
The abstract generator yields three sentences that roughly correspond to 40 token average length of abstracts in the SumeCzech. This length of summary was also confirmed by tuning on the validation set.
|
| 19 |
|
| 20 |
-
We manage to reach state-of-the art on most
|
| 21 |
|
| 22 |
|
| 23 |
Test set
|
|
|
|
| 17 |
The model was evaluated on the *test* and *ood-test* partitions of the SumeCzech dataset and compared to the best summarizers yet evaluated on this benchmark (the results taken from <a href="https://ufal.mff.cuni.cz/sumeczech">here</a>).
|
| 18 |
The abstract generator yields three sentences that roughly correspond to 40 token average length of abstracts in the SumeCzech. This length of summary was also confirmed by tuning on the validation set.
|
| 19 |
|
| 20 |
+
We manage to reach state-of-the art on most standard metrics.
|
| 21 |
|
| 22 |
|
| 23 |
Test set
|