Downloads · 30 days
7
21% of all-time downloads
yeye776/OndeviceAI-T5-base
OndeviceAI-T5-base is a machine learning model from yeye776. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as cc-by-4.0.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
7
21% of all-time downloads
All-time downloads
33
Public
Parameters
276M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.1 GB · 100%
From the Hugging Face model README
This model is a fine-tuned version of paust/pko-t5-base on the None dataset.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
from typing import List
tokenizer = AutoTokenizer.from_pretrained("yeye776/OndeviceAI-T5-base")
model = AutoModelForSeq2SeqLM.from_pretrained("yeye776/OndeviceAI-T5-base")
prompt = "분류 및 인식해줘 :"
def prepare_input(question: str):
inputs = f"{prompt} {question}"
input_ids = tokenizer(inputs, max_length=700, return_tensors="pt").input_ids
return input_ids
def inference(question: str) -> str:
input_data = prepare_input(question=question)
input_data = input_data.to(model.device)
outputs = model.generate(inputs=input_data, num_beams=10, top_k=10, max_length=1024)
result = tokenizer.decode(token_ids=outputs[0], skip_special_tokens=True)
return result
inference("안방 조명 켜줘")
The following hyperparameters were used during training: