Downloads · 30 days
18
3% of all-time downloads
youngermax/text-tagger-v1
text-tagger-v1 is a text generation model from youngermax. Use it when you need the model to write or continue text. It is set up for transformers.
This model identifies multiple topics related to the text in natural language. It is finetuned on youngermax/text-tagging for 3.5 epoch over ~1.3 hours on a free Kaggle P100.
Downloads · 30 days
18
3% of all-time downloads
All-time downloads
556
Public
Parameters
81.9M
328 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors328 MB · 100%
From the Hugging Face model README
This model identifies multiple topics related to the text in natural language. It is finetuned on youngermax/text-tagging for 3.5 epoch over ~1.3 hours on a free Kaggle P100.
input_ids = tokenizer.encode(prompt + '<|topic|>', return_tensors='pt').to('cuda')
# Generate text
output = model.generate(
input_ids,
max_length=1024,
num_return_sequences=1,
eos_token_id=tokenizer.eos_token_id,
pad_token_id=tokenizer.eos_token_id,
top_k=100,
top_p=0.5,
temperature=1
)
# Decode the output
text = tokenizer.decode(output[0], skip_special_tokens=False, early_stopping=True)
text = text[len(prompt):text.find('<|endoftext|>')]
topics = list(set(list(map(lambda x: x.strip(), text.split('<|topic|>')))[1:]))