Run this model with HF Jobs
Run WebOrganizer/TopicClassifier 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/WebOrganizer/TopicClassifier. 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/WebOrganizer/TopicClassifier 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 WebOrganizer/TopicClassifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WebOrganizer/TopicClassifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="WebOrganizer/TopicClassifier", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForSequenceClassification model = AutoModelForSequenceClassification.from_pretrained("WebOrganizer/TopicClassifier", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
[bugfix] Initialize attention bias on the same device as Query/Key/Value
#1
by kenneth-doh - opened
909 unmodified lines910911912913914915916909 unmodified linesbatch_size, seq_length = input_shapeif unpad_inputs and self.config.use_memory_efficient_attention:attention_bias = xops.fmha.attn_bias.BlockDiagonalMask.from_seqlens(length)else:# We can provide a self-attention mask of dimensions [batch_size, from_seq_length, to_seq_length]# ourselves in which case we just need to make it broadcastable to all heads.909 unmodified lines910911912913914915916909 unmodified linesbatch_size, seq_length = input_shapeif unpad_inputs and self.config.use_memory_efficient_attention:attention_bias = xops.fmha.attn_bias.BlockDiagonalMask.from_seqlens(length, device=embedding_output.device)else:# We can provide a self-attention mask of dimensions [batch_size, from_seq_length, to_seq_length]# ourselves in which case we just need to make it broadcastable to all heads.
modeling.py+1-1