flud / usage.md
Halfotter's picture
Upload 16 files
14ebc37 verified

Steel Material Classification Model

Quick Start

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

# Load model
model_name = "your-username/steel-material-classifier"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)

# Predict
text = "철광석을 κ³ λ‘œμ—μ„œ ν™˜μ›ν•˜μ—¬ 선철을 μ œμ‘°ν•˜λŠ” κ³Όμ •"
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)

with torch.no_grad():
    outputs = model(**inputs)
    predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
    predicted_class = torch.argmax(predictions, dim=1).item()

label = model.config.id2label[predicted_class]
confidence = predictions[0][predicted_class].item()
print(f"Predicted: {label} (Confidence: {confidence:.4f})")

Model Information

  • Base Model: XLM-RoBERTa
  • Task: Sequence Classification
  • Labels: 66 steel industry materials
  • Languages: Korean, English
  • Model Size: ~1GB

Supported Labels

The model can classify 66 different steel industry materials including:

  • Raw Materials: 철광석, μ„νšŒμ„, μ„μœ  μ½”ν¬μŠ€, 무연탄, κ°ˆνƒ„
  • Fuels: μ²œμ—°κ°€μŠ€, μ•‘ν™”μ²œμ—°κ°€μŠ€, 경유, 휘발유, λ“±μœ 
  • Gases: μΌμ‚°ν™”νƒ„μ†Œ, 메탄, 에탄, κ³ λ‘œκ°€μŠ€, μ½”ν¬μŠ€ 였븐 κ°€μŠ€
  • Products: κ°•μ² , μ„ μ² , μ² , μ—΄κ°„μ„±ν˜•μ²  (HBI), 고온 μ„±ν˜• ν™˜μ›μ² 
  • By-products: 고둜 슬래그, μ••μ—° μŠ€μΌ€μΌ, λΆ„μ§„, μŠ¬λŸ¬μ§€, μ ˆμ‚­μΉ©
  • Others: μ „κΈ°, λƒ‰κ°μˆ˜, μœ€ν™œμœ , 포μž₯재, μ—΄μœ μž…

Performance

  • Label Independence: Good (average similarity: 0.1166)
  • Orthogonality: Good (average dot product: 0.2043)
  • Overall Assessment: The model shows good separation between different material categories

Usage Examples

Single Prediction

text = "μ²œμ—°κ°€μŠ€λ₯Ό μ—°λ£Œλ‘œ μ‚¬μš©ν•˜μ—¬ 고둜λ₯Ό κ°€μ—΄"
# Returns: "μ²œμ—°κ°€μŠ€" with confidence score

Batch Prediction

texts = [
    "철광석을 κ³ λ‘œμ—μ„œ ν™˜μ›ν•˜μ—¬ 선철을 μ œμ‘°ν•˜λŠ” κ³Όμ •",
    "μ„νšŒμ„μ„ μ²¨κ°€ν•˜μ—¬ 슬래그λ₯Ό ν˜•μ„±"
]
# Returns: ["철광석", "μ„νšŒμ„"] with confidence scores

Installation

pip install torch transformers

License

[Add your license information]

Citation

If you use this model in your research, please cite:

[Add citation information here]