Summarization
Transformers
PyTorch
English
bart
text2text-generation
sagemaker
Eval Results (legacy)
Run this model with HF Jobs
Run philschmid/bart-base-samsum on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/philschmid/bart-base-samsum. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/philschmid/bart-base-samsum on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use philschmid/bart-base-samsum with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use philschmid/bart-base-samsum 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="philschmid/bart-base-samsum")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("philschmid/bart-base-samsum") model = AutoModelForSeq2SeqLM.from_pretrained("philschmid/bart-base-samsum", device_map="auto") - Notebooks
- Google Colab
- Kaggle
philschmid commited on
Commit ·
3456945
1
Parent(s): c0060c5
commit files to HF hub
Browse filesFiles changed (12)
- README.mdAdded+42
- all_results.jsonAdded+22
- config.jsonAdded+73
- eval_results.jsonAdded+11
- merges.txtAdded
- pytorch_model.binAdded+3
- special_tokens_map.jsonAdded+1
- tokenizer_config.jsonAdded+1
- train_results.jsonAdded+14
- trainer_state.jsonAdded+23
- training_args.binAdded+3
- vocab.jsonAdded
123456789101112131415161718192021222324252627282930313233343536373839404142
---language: entags:- sagemaker- bart- summarizationlicense: apache-2.0datasets:- samsum---
## bart-base-samsumThis model was trained using Amazon SageMaker and the new Hugging Face Deep Learning container.
For more information look at:- [🤗 Transformers Documentation: Amazon SageMaker](https://huggingface.co/transformers/sagemaker.html)- [Example Notebooks](https://github.com/huggingface/notebooks/tree/master/sagemaker)- [Amazon SageMaker documentation for Hugging Face](https://docs.aws.amazon.com/sagemaker/latest/dg/hugging-face.html)- [Python SDK SageMaker documentation for Hugging Face](https://sagemaker.readthedocs.io/en/stable/frameworks/huggingface/index.html)- [Deep Learning Container](https://github.com/aws/deep-learning-containers/blob/master/available_images.md#huggingface-training-containers)
## Result| key | value || --- | ----- || key | value || key | value |
## Usage```pythonfrom transformers import pipelinesummarizer = pipeline("summarization", model="philschmid/bart-base-samsum")
conversation = '''Jeff: Can I train a 🤗 Transformers model on Amazon SageMaker? Philipp: Sure you can use the new Hugging Face Deep Learning Container. Jeff: ok.Jeff: and how can I get started? Jeff: where can I find documentation? Philipp: ok, ok you can find everything here. https://huggingface.co/blog/the-partnership-amazon-sagemaker-and-hugging-face '''nlp(conversation)```12345678910111213141516171819202122{ "epoch": 3.0, "eval_loss": 1.5356481075286865, "eval_mem_cpu_alloc_delta": 659047, "eval_mem_cpu_peaked_delta": 18254, "eval_mem_gpu_alloc_delta": 0, "eval_mem_gpu_peaked_delta": 300285440, "eval_runtime": 0.3116, "eval_samples": 818, "eval_samples_per_second": 2625.337, "init_mem_cpu_alloc_delta": 180190, "init_mem_cpu_peaked_delta": 18282, "init_mem_gpu_alloc_delta": 558658048, "init_mem_gpu_peaked_delta": 0, "train_mem_cpu_alloc_delta": 6658519, "train_mem_cpu_peaked_delta": 642937, "train_mem_gpu_alloc_delta": 2267624448, "train_mem_gpu_peaked_delta": 10355728896, "train_runtime": 98.4931, "train_samples": 14732, "train_samples_per_second": 3.533}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273{ "_name_or_path": "facebook/bart-base", "activation_dropout": 0.1, "activation_function": "gelu", "add_bias_logits": false, "add_final_layer_norm": false, "architectures": [ "BartForConditionalGeneration" ], "attention_dropout": 0.1, "bos_token_id": 0, "classif_dropout": 0.1, "classifier_dropout": 0.0, "d_model": 768, "decoder_attention_heads": 12, "decoder_ffn_dim": 3072, "decoder_layerdrop": 0.0, "decoder_layers": 6, "decoder_start_token_id": 2, "dropout": 0.1, "early_stopping": true, "encoder_attention_heads": 12, "encoder_ffn_dim": 3072, "encoder_layerdrop": 0.0, "encoder_layers": 6, "eos_token_id": 2, "forced_eos_token_id": 2, "gradient_checkpointing": false, "id2label": { "0": "LABEL_0", "1": "LABEL_1", "2": "LABEL_2" }, "init_std": 0.02, "is_encoder_decoder": true, "label2id": { "LABEL_0": 0, "LABEL_1": 1, "LABEL_2": 2 }, "max_position_embeddings": 1024, "model_type": "bart", "no_repeat_ngram_size": 3, "normalize_before": false, "normalize_embedding": true, "num_beams": 4, "num_hidden_layers": 6, "pad_token_id": 1, "scale_embedding": false, "task_specific_params": { "summarization": { "length_penalty": 1.0, "max_length": 128, "min_length": 12, "num_beams": 4 }, "summarization_cnn": { "length_penalty": 2.0, "max_length": 142, "min_length": 56, "num_beams": 4 }, "summarization_xsum": { "length_penalty": 1.0, "max_length": 62, "min_length": 11, "num_beams": 6 } }, "transformers_version": "4.4.2", "use_cache": true, "vocab_size": 50265}1234567891011{ "epoch": 3.0, "eval_loss": 1.5356481075286865, "eval_mem_cpu_alloc_delta": 659047, "eval_mem_cpu_peaked_delta": 18254, "eval_mem_gpu_alloc_delta": 0, "eval_mem_gpu_peaked_delta": 300285440, "eval_runtime": 0.3116, "eval_samples": 818, "eval_samples_per_second": 2625.337}123version https://git-lfs.github.com/spec/v1oid sha256:f0c3f3be2e895993ca702b159f601e72a41087cb39704f40b85131491ad2216fsize 5579856831{"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "</s>", "pad_token": "<pad>", "cls_token": "<s>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": false}}1{"unk_token": "<unk>", "bos_token": "<s>", "eos_token": "</s>", "add_prefix_space": false, "errors": "replace", "sep_token": "</s>", "cls_token": "<s>", "pad_token": "<pad>", "mask_token": "<mask>", "model_max_length": 1024, "special_tokens_map_file": null, "name_or_path": "facebook/bart-base"}1234567891011121314{ "epoch": 3.0, "init_mem_cpu_alloc_delta": 180190, "init_mem_cpu_peaked_delta": 18282, "init_mem_gpu_alloc_delta": 558658048, "init_mem_gpu_peaked_delta": 0, "train_mem_cpu_alloc_delta": 6658519, "train_mem_cpu_peaked_delta": 642937, "train_mem_gpu_alloc_delta": 2267624448, "train_mem_gpu_peaked_delta": 10355728896, "train_runtime": 98.4931, "train_samples": 14732, "train_samples_per_second": 3.533}1234567891011121314151617181920212223{ "best_metric": null, "best_model_checkpoint": null, "epoch": 3.0, "global_step": 348, "is_hyper_param_search": false, "is_local_process_zero": true, "is_world_process_zero": true, "log_history": [ { "epoch": 3.0, "step": 348, "total_flos": 1.486313161228288e+16, "train_runtime": 98.4931, "train_samples_per_second": 3.533 } ], "max_steps": 348, "num_train_epochs": 3, "total_flos": 1.486313161228288e+16, "trial_name": null, "trial_params": null}123version https://git-lfs.github.com/spec/v1oid sha256:7ce1e4b47d7e2bf2d0c8b8757cb9b372beec5d3906ba7d3437ae751ffd3c50absize 2351README.mdAdded+42
all_results.jsonAdded+22
config.jsonAdded+73
eval_results.jsonAdded+11
merges.txtAdded
pytorch_model.binAdded+3
special_tokens_map.jsonAdded+1
tokenizer_config.jsonAdded+1
train_results.jsonAdded+14
trainer_state.jsonAdded+23
training_args.binAdded+3
vocab.jsonAdded