Run this model with HF Jobs

Run lllincoln/text-tagger-v1 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 and TRL to fine-tune https://huggingface.co/lllincoln/text-tagger-v1. 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/lllincoln/text-tagger-v1 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.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/lllincoln/text-tagger-v1. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/lllincoln/text-tagger-v1. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

Model Details

Model Description

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.

  • Developed by: Lincoln Maxwell
  • Model type: Generative Pretrained Transformer
  • Language(s) (NLP): English
  • Finetuned from model: DistilGPT2

Uses

Direct Use


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:]))
Downloads last month
15
Safetensors
Model size
81.9M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Dataset used to train lllincoln/text-tagger-v1