OndeviceAI-base
This model is a fine-tuned version of paust/pko-t5-base on the None dataset.
How to use
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
from typing import List
tokenizer = AutoTokenizer.from_pretrained("yeye776/OndeviceAI-base")
model = AutoModelForSeq2SeqLM.from_pretrained("yeye776/OndeviceAI-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("안방 조명 켜줘")
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0007
- train_batch_size: 4
- eval_batch_size: 4
- seed: 42
- gradient_accumulation_steps: 8
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.06
- num_epochs: 10
Training results
Framework versions
- Transformers 4.37.2
- Pytorch 2.2.0+cu121
- Datasets 2.16.1
- Tokenizers 0.15.1
- Downloads last month
- 5
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.
Model tree for yeye776/OndeviceAI-base
Base model
paust/pko-t5-base