This model is a fine-tuned version of
gogamza/kobart-summarization on an unknown dataset.
It achieves the following results on the evaluation set:
This model generates hash tag from input text.
This model was trained by the self-instruction process.
All data used for fine-tuning this model were generated by chatGPT 3.5.
Use the code below to get started with the model.
You can adjust hyperparameters to fit on your data.
1from transformers import PreTrainedTokenizerFast, BartForConditionalGeneration
2tokenizer = PreTrainedTokenizerFast.from_pretrained("jjae/kobart-hashtag")
3model = BartForConditionalGeneration.from_pretrained("jjae/kobart-hashtag")
4
5def make_tag(text):
6 input_ids = tokenizer.encode(text, return_tensors="pt").to(device)
7 output = model.generate(input_ids = input_ids, bos_token_id = model.config.bos_token_id,
8 eos_token_id = model.config.eos_token_id, length_penalty = 3.0, max_length = 50, num_beams = 4)
9 decoded_output = tokenizer.decode(output[0], skip_special_tokens=True)
10 return decoded_output