Instructions to use nathanx/CS685-text-summarizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nathanx/CS685-text-summarizer 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="nathanx/CS685-text-summarizer")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("nathanx/CS685-text-summarizer") model = AutoModelForSeq2SeqLM.from_pretrained("nathanx/CS685-text-summarizer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from nathanx/CS685-text-summarizer: direct link, hf CLI and curl.
- Browser
- Download file 2.13 kB
-
https://huggingface.co/nathanx/CS685-text-summarizer/resolve/main/README.md
- Command line
-
hf download hf://nathanx/CS685-text-summarizer/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/nathanx/CS685-text-summarizer/resolve/main/README.md
2.13 kB
| license: apache-2.0 | |
| tags: | |
| - summarization | |
| - generated_from_trainer | |
| metrics: | |
| - rouge | |
| model-index: | |
| - name: summarizer | |
| results: [] | |
| <!-- This model card has been generated automatically according to the information the Trainer had access to. You | |
| should probably proofread and complete it, then remove this comment. --> | |
| # summarizer | |
| This model is a fine-tuned version of [facebook/bart-base](https://huggingface.co/facebook/bart-base) on the None dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 2.5029 | |
| - Rouge1: 48.685 | |
| - Rouge2: 22.7386 | |
| - Rougel: 43.8124 | |
| - Rougelsum: 43.8396 | |
| ## Model description | |
| More information needed | |
| ## Intended uses & limitations | |
| More information needed | |
| ## Training and evaluation data | |
| More information needed | |
| ## Training procedure | |
| ### Training hyperparameters | |
| The following hyperparameters were used during training: | |
| - learning_rate: 5.6e-05 | |
| - train_batch_size: 4 | |
| - eval_batch_size: 4 | |
| - seed: 42 | |
| - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 | |
| - lr_scheduler_type: linear | |
| - num_epochs: 8 | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | Rouge1 | Rouge2 | Rougel | Rougelsum | | |
| |:-------------:|:-----:|:----:|:---------------:|:-------:|:-------:|:-------:|:---------:| | |
| | 2.3383 | 1.0 | 460 | 1.8745 | 49.3535 | 25.1806 | 45.1706 | 45.1579 | | |
| | 1.5714 | 2.0 | 920 | 1.9525 | 48.5102 | 23.7917 | 43.5276 | 43.5289 | | |
| | 1.0907 | 3.0 | 1380 | 2.0340 | 47.3071 | 22.9257 | 42.9624 | 43.0095 | | |
| | 0.7586 | 4.0 | 1840 | 2.2207 | 49.078 | 24.4061 | 44.8266 | 44.7489 | | |
| | 0.507 | 5.0 | 2300 | 2.3542 | 49.1445 | 23.918 | 44.4869 | 44.4544 | | |
| | 0.3503 | 6.0 | 2760 | 2.4352 | 47.8282 | 22.9394 | 43.2666 | 43.2609 | | |
| | 0.2434 | 7.0 | 3220 | 2.4867 | 48.8996 | 23.6147 | 44.4024 | 44.3788 | | |
| | 0.1769 | 8.0 | 3680 | 2.5029 | 48.685 | 22.7386 | 43.8124 | 43.8396 | | |
| ### Framework versions | |
| - Transformers 4.28.1 | |
| - Pytorch 2.0.0+cu118 | |
| - Datasets 2.11.0 | |
| - Tokenizers 0.13.3 | |