Fill-Mask
Transformers
PyTorch
English
bart
text2text-generation
summarization
long context
custom_code
Run this model with HF Jobs
Run ccdv/lsg-bart-base-4096 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/ccdv/lsg-bart-base-4096. 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/ccdv/lsg-bart-base-4096 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 ccdv/lsg-bart-base-4096 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ccdv/lsg-bart-base-4096 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="ccdv/lsg-bart-base-4096", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("ccdv/lsg-bart-base-4096", trust_remote_code=True) model = AutoModelForSeq2SeqLM.from_pretrained("ccdv/lsg-bart-base-4096", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
fix encoder decoder
Browse files997 unmodified lines99899910001001100210031004997 unmodified lines)# Pad mask for global tokensif self.pass_global_tokens_to_decoder:attention_mask = torch.nn.functional.pad(attention_mask, pad=(self.num_global_tokens, 0), value=1)# decoder outputs consists of (dec_features, past_key_value, dec_hidden, dec_attn)997 unmodified lines99899910001001100210031004997 unmodified lines)# Pad mask for global tokensif self.pass_global_tokens_to_decoder and attention_mask is not None:attention_mask = torch.nn.functional.pad(attention_mask, pad=(self.num_global_tokens, 0), value=1)# decoder outputs consists of (dec_features, past_key_value, dec_hidden, dec_attn)
modeling_lsg_bart.py+1-1