Edit model card

Easy-Systems/easy-ko-gemma-2-9b-it-v1

DALL-E๋กœ ์ƒ์„ฑํ•œ ์ด๋ฏธ์ง€์ž…๋‹ˆ๋‹ค.

  • google/gemma-2-9b-it ๋ฅผ ๋ฒ ์ด์Šค๋กœ ํ•˜์—ฌ ๋‹ค์–‘ํ•œ Task(QA, Summary, Translate, Coding, Math ๋“ฑ)๊ฐ€ ๊ตฌ์„ฑ๋œ ํ•œ๊ตญ์–ด ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŒŒ์ธํŠœ๋‹ ๋œ ๋ชจ๋ธ ์ž…๋‹ˆ๋‹ค.
  • ์ •์ œ๋œ 6๋งŒ๊ฐœ์˜ ๋ฐ์ดํ„ฐ๋กœ ํŒŒ์ธํŠœ๋‹์„ ํ†ตํ•ด Task ๋ณ„ ๋‹ต๋ณ€์ด ๊ฐœ์„ ๋œ ๋ชจ๋ธ ์ž…๋‹ˆ๋‹ค.

Data

  • AI hub (https://www.aihub.or.kr/), ๊ตญ๋ฆฝ๊ตญ์–ด์›(https://www.korean.go.kr/) ๋ฐ์ดํ„ฐ๋ฅผ ๋‹ค์–‘ํ•œ Task๋กœ ๊ฐ€๊ณตํ•˜์—ฌ ํŒŒ์ธํŠœ๋‹์— ์‚ฌ์šฉ.

How to use

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig

model_id = "Easy-Systems/easy-ko-gemma-2-9b-it-v1"
model = AutoModelForCausalLM.from_pretrained(model_id,                                            
                                             attn_implementation="eager",                                            
                                             torch_dtype=torch.bfloat16,
                                             device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(model_id)

prompt=""

messages = [    
    {"role": "user", "content": "๋‹น์‹ ์€ ์นœ์ ˆํ•œ AI chatbot ์ž…๋‹ˆ๋‹ค. ์š”์ฒญ์— ๋Œ€ํ•ด์„œ ํ•œ๊ตญ์–ด๋กœ ๋‹ต๋ณ€ํ•ด์ฃผ์„ธ์š”.\n" + prompt},
]
input_ids = tokenizer.apply_chat_template(
    messages,
    add_generation_prompt=True,
    return_tensors="pt"
).to(model.device)

outputs = model.generate(
    input_ids,
    max_new_tokens=2048,    
    do_sample=True,
    temperature=0.3,
    repetition_penalty=1.1,
    top_p=0.95,
    top_k=40,
)

response = outputs[0][input_ids.shape[-1]:]
print(tokenizer.decode(response, skip_special_tokens=True).strip())

Example Output

"maywell/logickor_evaluators" ์˜ ์งˆ๋ฌธ์„ ์‚ฌ์šฉํ•จ.

  • Math

f(x) = 3x^3 + 2x^2 + 58์„ ๋ฏธ๋ถ„ํ•˜์‹œ์˜ค, ๋ฏธ๋ถ„ํ•œ ์‹์„ ํ•œ ๋ฒˆ ๋” ๋ฏธ๋ถ„ํ•ด๋ณด์‹œ์˜ค.

f(x) = 3x^3 + 2x^2 + 58์˜ ๋ฏธ๋ถ„์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

f'(x) = 9x^2 + 4x

f'(x)๋ฅผ ํ•œ ๋ฒˆ ๋” ๋ฏธ๋ถ„ํ•˜๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

f''(x) = 18x + 4
  • Reasnoning

๋ฏผ์ˆ˜์—๊ฒŒ๋Š” ๋นจ๊ฐ„์ƒ‰ ์…”์ธ  ํ•œ ๋ฒŒ๊ณผ ๋…ธ๋ž€์ƒ‰ ์…”์ธ  ๋‹ค์„ฏ ๋ฒŒ์ด ์žˆ์–ด. ๋ฏผ์ˆ˜๊ฐ€ ๋…ธ๋ž€์ƒ‰ ๋ฐ”์ง€ 3๋ฒŒ์„ ์ƒˆ๋กœ ๊ตฌ๋งคํ•˜๊ณ  ๋…ธ๋ž€์ƒ‰ ๋ฐ”์ง€ ๋‘ ๋ฒŒ์„ ์นœ๊ตฌ์—๊ฒŒ ์„ ๋ฌผํ–ˆ์„ ๋•Œ ๋ฏผ์ˆ˜๋Š” ๋ช‡ ๋ฒŒ์˜ ๋…ธ๋ž€์ƒ‰ ์…”์ธ ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์„๊นŒ?

๋ฏผ์ˆ˜๊ฐ€ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ์…”์ธ ๋“ค์˜ ์ƒ‰์ƒ์„ ๋ชจ๋‘ ์„ž์œผ๋ฉด ๋ฌด์Šจ ์ƒ‰์ด ๋ ๊นŒ? ๋ฌผ๊ฐ์˜ ๊ฒฝ์šฐ์™€ ๋น›์˜ ๊ฒฝ์šฐ๋ฅผ ๋ชจ๋‘ ์„ค๋ช…ํ•ด์ค˜.

๋ฏผ์ˆ˜๋Š” ๋…ธ๋ž€์ƒ‰ ์…”์ธ  ๋‹ค์„ฏ ๋ฒŒ์„ ๊ฐ€์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋…ธ๋ž€์ƒ‰ ๋ฐ”์ง€์˜ ์ˆ˜๋Š” ๋ฏผ์ˆ˜๊ฐ€ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ์…”์ธ ์˜ ์ƒ‰์ƒ๊ณผ ๊ด€๋ จ์ด ์—†์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ๋ฏผ์ˆ˜๋Š” ์—ฌ์ „ํžˆ 5๋ฒŒ์˜ ๋…ธ๋ž€์ƒ‰ ์…”์ธ ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค.



๋ฏผ์ˆ˜๊ฐ€ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ์…”์ธ ๋“ค์˜ ์ƒ‰์ƒ์„ ๋ชจ๋‘ ์„ž์œผ๋ฉด ๋ฌด์Šจ ์ƒ‰์ด ๋ ๊นŒ์š”? ๋ฌผ๊ฐ์˜ ๊ฒฝ์šฐ์™€ ๋น›์˜ ๊ฒฝ์šฐ๋ฅผ ๋ชจ๋‘ ์„ค๋ช…ํ•ด ๋“œ๋ฆฌ๊ฒ ์Šต๋‹ˆ๋‹ค.



๋ฌผ๊ฐ: ๋นจ๊ฐ„์ƒ‰๊ณผ ๋…ธ๋ž€์ƒ‰์„ ์„ž์œผ๋ฉด ์ฃผํ™ฉ์ƒ‰์ด ๋ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ๋ฏผ์ˆ˜๊ฐ€ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ๋ชจ๋“  ์…”์ธ ๋ฅผ ์„ž์œผ๋ฉด ์ฃผํ™ฉ์ƒ‰์ด ๋  ๊ฒƒ์ž…๋‹ˆ๋‹ค.

๋น›: ๋นจ๊ฐ„์ƒ‰๊ณผ ๋…ธ๋ž€์ƒ‰์„ ์„ž์œผ๋ฉด ์ฃผํ™ฉ์ƒ‰์ด ๋ฉ๋‹ˆ๋‹ค. ์ด๋Š” ๋ฌผ๊ฐ๊ณผ ๊ฐ™์€ ์›๋ฆฌ๋กœ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ, ๋น›์€ ๋‹ค๋ฅธ ์ƒ‰์ƒ์˜ ๋น›์„ ํก์ˆ˜ํ•˜๊ณ  ๋ฐ˜์‚ฌํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ์ž‘๋™ํ•˜๊ธฐ ๋•Œ๋ฌธ์—, ๋นจ๊ฐ„์ƒ‰๊ณผ ๋…ธ๋ž€์ƒ‰ ๋น›์„ ์„ž์œผ๋ฉด ์ฃผํ™ฉ์ƒ‰ ๋น›์ด ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค
  • Coding

์ฝ”๋”ฉ ๋ฌธ์ œ ์ฃผ์–ด์ง„ ๋ฆฌ์ŠคํŠธ์—์„œ ์ค‘๋ณต๋˜์ง€ ์•Š๋Š” ์ฒซ ๋ฒˆ์งธ ๋ฌธ์ œ๋ฅผ ๋ฐ˜ํ™˜ํ•˜๋Š” ํ•จ์ˆ˜๋ฅผ ์ž‘์„ฑํ•ด๋ผ.

ํ•จ์ˆ˜๋ช…: find_unique_character

๋งค๊ฐœ๋ณ€์ˆ˜: characters (list)

๋ฐ˜ํ™˜๊ฐ’: ์ค‘๋ณต๋˜์ง€ ์•Š๋Š” ์ฒซ ๋ฒˆ์งธ ๋ฌธ์ž

์˜ˆ์‹œ:

์ž…๋ ฅ: ['a', 'b', 'c', 'a', 'd'] ์ถœ๋ ฅ: 'b'

์ž…๋ ฅ: ['a', 'b', 'a', 'b', 'c'] ์ถœ๋ ฅ: 'c'

์ž…๋ ฅ: ['a', 'b', 'c', 'd', 'e'] ์ถœ๋ ฅ: 'a'

์–ธ์–ด๋Š” ์ž์œ ๋กญ๊ฒŒ ์‚ฌ์šฉ ํ• ์ˆ˜ ์žˆ๋‹ค,

def find_unique_character(characters):
  """
  ์ฃผ์–ด์ง„ ๋ฆฌ์ŠคํŠธ์—์„œ ์ค‘๋ณต๋˜์ง€ ์•Š๋Š” ์ฒซ ๋ฒˆ์งธ ๋ฌธ์ž๋ฅผ ๋ฐ˜ํ™˜ํ•˜๋Š” ํ•จ์ˆ˜

  Args:
    characters: ๋ฌธ์ž์—ด ๋ฆฌ์ŠคํŠธ

  Returns:
    ์ค‘๋ณต๋˜์ง€ ์•Š๋Š” ์ฒซ ๋ฒˆ์งธ ๋ฌธ์ž
  """
  for char in characters:
    if characters.count(char) == 1:
      return char

# ์˜ˆ์‹œ ์‚ฌ์šฉ
print(find_unique_character(['a', 'b', 'c', 'a', 'd']))  # ์ถœ๋ ฅ: b
print(find_unique_character(['a', 'b', 'a', 'b', 'c']))  # ์ถœ๋ ฅ: c
print(find_unique_character(['a', 'b', 'c', 'd', 'e']))  # ์ถœ๋ ฅ: a

์„ค๋ช…:


ํ•จ์ˆ˜ ์ •์˜: find_unique_character(characters) ํ•จ์ˆ˜๋ฅผ ์ •์˜ํ•ฉ๋‹ˆ๋‹ค. ์ด ํ•จ์ˆ˜๋Š” ๋ฌธ์ž์—ด ๋ฆฌ์ŠคํŠธ characters๋ฅผ ์ž…๋ ฅ์œผ๋กœ ๋ฐ›์Šต๋‹ˆ๋‹ค.

๋ฐ˜๋ณต๋ฌธ: for char in characters: ๋ฌธ์„ ์‚ฌ์šฉํ•˜์—ฌ ๋ฆฌ์ŠคํŠธ์˜ ๊ฐ ๋ฌธ์ž๋ฅผ ์ˆœํšŒํ•ฉ๋‹ˆ๋‹ค.

์ค‘๋ณต ํ™•์ธ: characters.count(char) == 1 ์„ ์‚ฌ์šฉํ•˜์—ฌ ํ˜„์žฌ ๋ฌธ์ž char๊ฐ€ ๋ฆฌ์ŠคํŠธ์—์„œ ํ•œ ๋ฒˆ๋งŒ ๋‚˜ํƒ€๋‚˜๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

๋ฐ˜ํ™˜: ๋งŒ์•ฝ ์ค‘๋ณต๋˜์ง€ ์•Š๋Š” ์ฒซ ๋ฒˆ์งธ ๋ฌธ์ž๋ฅผ ์ฐพ์œผ๋ฉด, ๋ฐ”๋กœ ํ•ด๋‹น ๋ฌธ์ž๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

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

์ฝ”๋“œ์˜ ์˜ˆ์‹œ ๋ถ€๋ถ„์€ ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋‹ค์–‘ํ•œ ์ž…๋ ฅ ๋ฆฌ์ŠคํŠธ์— ๋Œ€ํ•ด ํ…Œ์ŠคํŠธํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค. ๊ฐ ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค๋Š” find_unique_character() ํ•จ์ˆ˜๋ฅผ ํ˜ธ์ถœํ•˜๊ณ  ์ถœ๋ ฅ ๊ฒฐ๊ณผ๋ฅผ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.

License

  • Creative Commons Attribution-NonCommercial-ShareAlike 4.0 (CC-BY-NC-SA-4.0)
  • ์ƒ์—…์  ์‚ฌ์šฉ ์‹œ, ์•„๋ž˜์˜ ์—ฐ๋ฝ์ฒ˜๋กœ ๋ฌธ์˜ํ•ด์ฃผ์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค.

Contact

  • ์ƒ์—…์  ์‚ฌ์šฉ ๋˜๋Š” ๊ธฐํƒ€ ๋ฌธ์˜ ์‚ฌํ•ญ์— ๋Œ€ํ•˜์—ฌ ์—ฐ๋ฝํ•˜์‹œ๋ ค๋ฉด ๋‹ค์Œ ์ด๋ฉ”์ผ๋กœ ์—ฐ๋ฝ ์ฃผ์‹ญ์‹œ์˜ค.
  • ๊ฐ•ํ˜„๊ตฌ: [email protected]
Downloads last month
31
Safetensors
Model size
9.24B params
Tensor type
BF16
ยท
Inference Examples
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.