HW-202337458-mytext-sequence-classification

Assignment

์ปค์Šคํ…€ ๋ชจ๋ธ ์ •๋ฆฌ ๋ฐ ์—…๋กœ๋“œ ๊ณผ์ œ์ž…๋‹ˆ๋‹ค.

Student

  • Student ID: 202337458
  • Hugging Face ID: hf-june

Included Classes

  • MyTextConfig
  • MyTextSequenceClassification

Requirements

  • MyTextConfig ์ฝ”๋“œ ์ •๋ฆฌ
  • MyTextSequenceClassification ์ฝ”๋“œ ์ •๋ฆฌ
  • ๋งˆํฌ๋‹ค์šด ์ฃผ์„ ํฌํ•จ
  • save_pretrained ์‚ฌ์šฉ
  • push_to_hub ์‚ฌ์šฉ

Files

  • modeling_mytext_sequence_classification.py
  • mytext_sequence_classification_summary.ipynb
  • saved_model/
  • test_result.json
  • README.md

How to Use

import torch
from modeling_mytext_sequence_classification import MyTextConfig, MyTextSequenceClassification

config = MyTextConfig()
model = MyTextSequenceClassification(config)

input_ids = torch.randint(0, config.vocab_size, (2, 10))
attention_mask = torch.ones_like(input_ids)
labels = torch.tensor([0, 1])

outputs = model(input_ids=input_ids, attention_mask=attention_mask, labels=labels)
print(outputs.loss)
print(outputs.logits)
Downloads last month
31
Safetensors
Model size
3.92M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support