Text Classification
Transformers
Safetensors
English
deberta-v2
product-detection
hazard-detection
text-embeddings-inference
Instructions to use Quintu/deberta-multitask-v0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Quintu/deberta-multitask-v0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Quintu/deberta-multitask-v0")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Quintu/deberta-multitask-v0", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Create README.md
Browse files123---license: apache-2.0---12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788---license: apache-2.0base_model:- microsoft/deberta-v3-large---Multi-Task Product and Hazard ClassifierThis model performs multi-task classification to predict both product categories and hazard categories from text descriptions. It's based on DeBERTa-v3 architecture and trained to identify product types and potential hazards simultaneously.Model DescriptionModel Type: Multi-task classification (DeBERTa-v3 base)Languages: EnglishPipeline Tag: text-classificationMax Sequence Length: 1024 tokensUsagepythonCopyfrom transformers import AutoTokenizer, AutoModelimport torchfrom torch.nn import functional as F# Load model and tokenizertokenizer = AutoTokenizer.from_pretrained("your-username/model-name")model = AutoModel.from_pretrained("your-username/model-name")# Prepare your texttext = "Your product description here"# Tokenize and prepare inputinputs = tokenizer(text,padding=True,truncation=True,max_length=1024,return_tensors="pt",return_token_type_ids=False)# Run inferencewith torch.no_grad():outputs = model(**inputs)product_logits = outputs['product_logits']hazard_logits = outputs['hazard_logits']product_probs = F.softmax(product_logits, dim=-1)hazard_probs = F.softmax(hazard_logits, dim=-1)# Get predictionsproduct_predictions = product_probs.cpu().numpy()hazard_predictions = hazard_probs.cpu().numpy()Prediction LabelsProduct CategoriespythonCopyproduct_labels = {'0': 'label_0','1': 'label_1',# Add your product category labels here}Hazard CategoriespythonCopyhazard_labels = {'0': 'label_0','1': 'label_1',# Add your hazard category labels here}Model LimitationsThe model is designed for English text onlyMaximum input length is 1024 tokensPerformance may vary for texts significantly different from the training dataTraining DataThe model was trained on a dataset containing product descriptions with their corresponding product categories and hazard classifications. The training data includes various product types and potential hazards commonly found in consumer products.Evaluation Results[Add your model's evaluation metrics here]Intended Uses & LimitationsIntended Uses:Product categorizationHazard identification in product descriptionsSafety analysis of product textLimitations:Should not be used as the sole decision maker for safety-critical applicationsRequires human verification for important safety decisionsMay not recognize new or unusual product types/hazardsCitation[Add citation information if applicable]Contact[Your contact information or where to report issues]
README.md+88-3