abhisehk18 / abhisehk18/Medical
Hugingface Bart outputs summary in which first word is ignored
- Dominant language
- Jupyter Notebook
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
hi,
i am trying to finetune BART for text summarization.But the output summary does not show the first word
Example--Bart output-''ings are s o multifocal patchy homogeneous areas of ground glass attenuation with septal thickening in both lung fields '
Actual output--''findings are s o multifocal patchy homogeneous areas of ground glass attenuation with septal thickening in both lung fields .''
i am using pretrained bart-base
tokenizer--
text_input_ids = tokenizer.batch_encode_plus([text],max_length=512,pad_to_max_length=True,
return_tensors='pt',truncation=True)
Contributor guide
No contributing guide indexed for this repository
Research direction
Look at the tokenizer configuration and decoding step in the summarization script. The issue likely relates to how special tokens (like BOS/EOS) are handled during generation. Start by examining the tokenizer's encode/decode methods and the model's generate call. Verify the output by comparing token IDs before and after decoding to see if the first token is being dropped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- huggingface, jupyter-notebook, python
- Domain
- ai, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100