YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

WIP

  • ์•„์ง ์ž‘์—…์ค‘์ž…๋‹ˆ๋‹ค.. ๋ชจ๋ธ์— ๋ฌธ์ œ๊ฐ€ ์ข€ ์žˆ์Œ ใ…  original model: 42dot/42dot_LLM-PLM-1.3B

์‚ฌ์šฉ ์˜ˆ์‹œ

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_id = "heegyu/42dot_LLM-PLM-1.3B-mt"
model = AutoModelForCausalLM.from_pretrained(model_id).eval().half()
tokenizer = AutoTokenizer.from_pretrained(model_id)

if torch.cuda.is_available():
  device = "cuda:0"
  model.to(device)
else:
  device = "cpu"

@torch.no_grad()
def generate_text(prompt):
  input_ids = tokenizer.encode(prompt, return_tensors="pt", add_special_tokens=False).to(device)
  output_ids = model.generate(input_ids, min_new_tokens=4, max_length=1024, early_stopping=True)
  output_ids = output_ids.cpu()[0][len(input_ids[0]):]
  print(tokenizer.decode(output_ids))

bos, eos = tokenizer.bos_token, tokenizer.eos_token

# ํ•œ -> ์˜
text = "์‚ผ์„ฑ์ „์ž๊ฐ€ ๊ฐค๋Ÿญ์‹œ ์Šค๋งˆํŠธํฐยทํƒœ๋ธ”๋ฆฟ ์ „์šฉ โ€˜ํด๋ผ์šฐ๋“œ ๊ฒŒ์ž„ ํ”Œ๋žซํผโ€™์„ ์ด๋ฅด๋ฉด ์ด๋‹ฌ ๊ณต๊ฐœํ•œ๋‹ค. ์ „ ์„ธ๊ณ„ 10์–ต ๋ช…์˜ ๊ฐค๋Ÿญ์‹œ ์‚ฌ์šฉ์ž๊ฐ€ ์ฝ˜์†”(๊ฒŒ์ž„๊ธฐ)์„ ๊ตฌ๋งคํ•˜๊ฑฐ๋‚˜ ๊ฒŒ์ž„ ์•ฑ์„ ๋‚ด๋ ค๋ฐ›์ง€ ์•Š์•„๋„ ์Šค๋งˆํŠธํฐ์„ ํ†ตํ•ด ์‹ค์‹œ๊ฐ„์œผ๋กœ ์œ ๋ช… ๊ฒŒ์ž„์„ ์ฆ๊ธธ ์ˆ˜ ์žˆ๊ฒŒ ๋˜๋Š” ๊ฒƒ์ด๋‹ค. ๊ธฐ๊ธฐ ํŒ๋งค์— ์˜์กดํ•˜์ง€ ์•Š๊ณ  ์•ˆ์ •์ ์ธ ์„œ๋น„์Šค ์ˆ˜์ต์„ ์˜ฌ๋ฆฌ๋ ค๋Š” ์‚ผ์„ฑ์ „์ž์˜ โ€˜์‹ ์‚ฌ์—… ์Šน๋ถ€์ˆ˜โ€™๋ž€ ํ‰๊ฐ€๊ฐ€ ๋‚˜์˜จ๋‹ค."
generate_text(f"{bos} {text} {eos} ")
# ใˆœSamsung Electronics will release the Cloud Game Platform for Galaxy smartphones and tablets in early this month, allowing users of 1 billion people around the world to enjoy famous games on their smartphones in real time without buying consoles or downloading game apps. It is said to be a 'business move' by Samsung Electronics, which is trying to earn stable service revenue without relying on sales.<|endoftext|>

# ์˜ -> ํ•œ, ๋งˆ์ง€๋ง‰ ๋ฌธ์žฅ ์งค๋ ธ์Œ
text = """Samsung Electronics will unveil a "cloud game platform" exclusively for Galaxy smartphones and tablets as early as this month. One billion Galaxy users around the world will be able to enjoy famous games in real time through smartphones without having to purchase consoles or download game apps. Analysts say that Samsung Electronics is a "new business winning move" to earn stable service profits without relying on device sales."""
generate_text(f"{bos} {text} {eos} ")
# ๏ผฎ๏ผฃ๋Š” ์ด๋‹ฌ ์ค‘ ๊ฐค๋Ÿญ์‹œ ์Šค๋งˆํŠธํฐ๊ณผ ํƒœ๋ธ”๋ฆฟ ์ „์šฉ 'ํด๋ผ์šฐ๋“œ ๊ฒŒ์ž„ ํ”Œ๋žซํผ'์„ ๋…์  ๊ณต๊ฐœํ•  ์˜ˆ์ •์ธ๋ฐ, ์ „ ์„ธ๊ณ„ 1์–ต๋ช…์˜ ๊ฐค๋Ÿญ์‹œ ์‚ฌ์šฉ์ž๋“ค์€ ์ฝ˜์†”์ด๋‚˜ ๊ฒŒ์ž„ ์•ฑ ๋‹ค์šด๋กœ๋“œ ์—†์ด ์Šค๋งˆํŠธํฐ์„ ํ†ตํ•ด ์œ ๋ช… ๊ฒŒ์ž„์„ ์‹ค์‹œ๊ฐ„์œผ๋กœ ์ฆ๊ธธ ์ˆ˜ ์žˆ๊ฒŒ ๋๋‹ค.<|endoftext|>

# ์˜ -> ํ•œ, ์•ž์— ๋ฒˆ์—ญํ•œ ๋‹จ์–ด๋ฅผ ์ง€์ •ํ•  ์ˆ˜ ์žˆ๋‹ค.
text = """Samsung Electronics will unveil a "cloud game platform" exclusively for Galaxy smartphones and tablets as early as this month."""
generate_text(f"{bos} Samsung Electronics {eos} ์‚ผ์„ฑ์ „์ž {eos} {bos} {text} {eos} ")
# ๏ผฎ๊ฐ€์ „ ์‚ผ์„ฑ์ „์ž๊ฐ€ ๊ฐค๋Ÿญ์‹œ ์Šค๋งˆํŠธํฐ๊ณผ ํƒœ๋ธ”๋ฆฟ ์ „์šฉ 'ํด๋ผ์šฐ๋“œ ๊ฒŒ์ž„ ํ”Œ๋žซํผ'์„ ์ด๋‹ฌ ์ค‘์œผ๋กœ ๊ณต๊ฐœํ•œ๋‹ค.<|endoftext|>

๋ชจ๋ธ ํ‰๊ฐ€

python main.py \
    --model hf-causal \
    --model_args pretrained=heegyu/42dot_LLM-PLM-1.3B-mt \
    --tasks kobest_hellaswag,kobest_copa,kobest_boolq,kobest_sentineg \
    --device cuda:0
  • boolq, copa, hellaswag์€ ์›๋ณธ ๋ชจ๋ธ๋ณด๋‹ค ๊ฐ์†Œํ–ˆ๋‹ค.
  • sentineg๋Š” ํฌ๊ฒŒ ํ–ฅ์ƒ

hf-causal (pretrained=heegyu/42dot_LLM-PLM-1.3B-mt), limit: None, provide_description: False, num_fewshot: 0, batch_size: None

Task Version Metric Value Stderr
kobest_boolq 0 acc 0.5021 ยฑ 0.0133
macro_f1 0.3343 ยฑ 0.0059
kobest_copa 0 acc 0.6640 ยฑ 0.0149
macro_f1 0.6633 ยฑ 0.0149
kobest_hellaswag 0 acc 0.4020 ยฑ 0.0219
acc_norm 0.5220 ยฑ 0.0224
macro_f1 0.3974 ยฑ 0.0218
kobest_sentineg 0 acc 0.8010 ยฑ 0.0201
macro_f1 0.8003 ยฑ 0.0201
Downloads last month
8
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Space using heegyu/42dot_LLM-PLM-1.3B-mt 1