레이블이 maximum token length인 게시물을 표시합니다. 모든 게시물 표시
레이블이 maximum token length인 게시물을 표시합니다. 모든 게시물 표시

2023년 9월 22일 금요일

huggingface 모델의 maximum token length 알아보는 방법

from transformers import AutoConfig

model_name = "EleutherAI/polyglot-ko-5.8b"

config = AutoConfig.from_pretrained(model_name)

max_length = config.max_position_embeddings

print("Maximum input sequence length:", max_length)