Edit model card

Kor-Gemma-2B

Update @ 2024.05.10: First release of gemma-ko

This model card corresponds to the 2B-it version of the Gemma-Ko model.

Resources and Technical Documentation:

Citation

@misc {gemma-summary-v01 ,
    author       = { {frcp,nebchi,pepperonipizza} },
    title        = { gemma-summary-v01  },
    year         = 2024,
    url          = { https://huggingface.co/cpm-ai/gemma-ko-v01 },
    publisher    = { Hugging Face }
}

Model Developers: frcp, nebchi, pepperonipizza

Model Information

I trained a language model using a dataset of 363,000 Korean text samples.

Description

It has been trained with a large amount of Korean tokens compared to other LLMs, enabling it to generate high-quality Korean text. Additionally, it shows improved performance with less data compared to other LLM models.

Running the model on a single / multi GPU

from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("cpm-ai/gemma-ko-v01")
model = AutoModelForCausalLM.from_pretrained("cpm-ai/gemma-ko-v01", device_map="auto")

prompt = """μš”μ•½ ν•  λ¬Έμž₯ :
[μ•ˆλ…•ν•˜μ„Έμš” 생방솑 ν† λ‘ μΉ΄νŽ˜μž…λ‹ˆλ‹€.
였늘 μ„±νƒ„μ ˆ μ „μ•Ό μƒλ°©μ†‘μœΌλ‘œ 진행해 λ“œλ¦¬κ³  μžˆλŠ”λ°μš”.
νŠΉμ§‘μœΌλ‘œ 저희가 λΆ„μœ„κΈ°λ„ 많이 λ°”κΏ”λ΄€κ³  또 μ˜€λŠ˜μ€ μ‚¬λž‘μ˜ κ³„μ ˆμ΄λ‹ˆλ§ŒνΌ λ‚˜λˆ”μ— λŒ€ν•΄μ„œ 이야기 ν•΄λ³ΌκΉŒ ν•©λ‹ˆλ‹€.
ν‰μ†Œ μƒν™œ μ†μ˜ λ‚˜λˆ”μ„ 늘 μ‹€μ²œν•˜κ³  κ³„μ‹œλŠ” λ„€ λΆ„ λͺ¨μ‹œκ³  이야기 λ‚˜λˆ λ³΄λ„λ‘ ν•˜κ² μŠ΅λ‹ˆλ‹€ 그럼 λ„€ λΆ„ μ†Œκ°œν•΄ λ“œλ¦¬κ² μŠ΅λ‹ˆλ‹€ λ“€μ–΄μ˜€μ‹œμ£ .
λ„€ 였늘 생방솑 ν† λ‘  μΉ΄νŽ˜μ—μ„œλŠ” λ‚˜λˆ”μ˜ μ˜λ―Έμ— λŒ€ν•΄μ„œ 이야기 λ‚˜λˆ λ³ΌκΉŒ ν•˜λŠ”λ°μš”.
μ–΄ μ „μ•Όμ œ 이제 내일이면 크리슀마슀고 μ§€κΈˆ 아홉 μ‹œ μ‹­μ‚Ό λΆ„ μ§€λ‚˜κ³  μžˆκ±°λ“ μš” μ‚°νƒ€ν΄λ‘œμŠ€ 할아버지가 μƒλ‹Ήνžˆ 바빠진 그런 μ‹œκ°„μž…λ‹ˆλ‹€.
이럴 λ•Œ κ°€μ‘±κ³Ό λ˜λŠ” μΉœμ§€λ“€κ³Ό ν•¨κ»˜ 보내셔야 될 이 κ·€ν•œ μ‹œκ°„ λ‚΄ μ£Όμ…”μ„œ μ˜€μ‹  λ„€ λΆ„ λ¨Όμ € μ†Œκ°œν•΄ λ“œλ¦¬λ„λ‘ ν•˜κ² μŠ΅λ‹ˆλ‹€.
λ¨Όμ € &party-name1&의 μœ„μ›μž…λ‹ˆλ‹€.
μ•ˆλ…•ν•˜μ„Έμš”.
그리고 μˆ­μ‹€λŒ€ν•™κ΅ μ‚¬νšŒμ‚¬μ—…ν•™κ³Όμ˜ κ΅μˆ˜μž…λ‹ˆλ‹€.
μ•ˆλ…•ν•˜μ„Έμš”.
그리고 μ•„λ¦„λ‹€μš΄ μž¬λ‹¨μ˜ μƒμž„μ΄μ‚¬ μž…λ‹ˆλ‹€.
μ•ˆλ…•ν•˜μ„Έμš”.
그리고 μ‚¬λž‘μ˜ μž₯κΈ°κΈ°μ¦μš΄λ™λ³ΈλΆ€μ— κ΅­μž₯λ‹˜μ΄μ‹­λ‹ˆλ‹€.
μ•ˆλ…•ν•˜μ„Έμš”.
μ΄λ ‡κ²Œ λ‚˜μ™€ μ£Όμ…”μ„œ λ‹€μ‹œ ν•œλ²ˆ κ°μ‚¬λ“œλ¦¬κ΅¬μš”.
그리고 였늘 νŠΉλ³„νžˆ 저희 ν† λ‘  μΉ΄νŽ˜μ—λŠ” μš©μ‚°κ΅¬ μžμ›λ΄‰μ‚¬ μ„Όν„°μ—μ„œ λ΄‰μ‚¬ν™œλ™μ„ 늘 ν•˜μ‹œλŠ” 뢄듀이 λ‚˜μ™€μ£Όμ…¨μŠ΅λ‹ˆλ‹€.
였늘 λ‚˜μ™€μ£Όμ‹  λΆ„λ“€ λ‹€μ‹œ ν•œλ²ˆ ν™˜μ˜ν•˜κ³  μ§„μ‹¬μœΌλ‘œ κ°μ‚¬λ“œλ¦½λ‹ˆλ‹€.
늘 이런 μ–˜κΈ°λ₯Ό ν•˜μ£  μš°λ¦¬μ‚¬νšŒμ—λŠ” 아직도 곡동체 μ˜μ‹μ΄ λΆ€μ‘±ν•˜λ‹€ λ‚˜λˆ”μ˜ μ˜μ‹μ΄ λΆ€μ‘±ν•˜λ‹€ κΈ°λΆ€ λ¬Έν™”κ°€ 정착돼 μžˆμ§€ μ•Šλ‹€ 그런 μ–˜κΈ°λ“€μ„ 많이 ν•˜λŠ”λ°μš”.
μ–΄λ–»κ²Œ ν•˜λ©΄ κ·ΈλŸ¬ν•œ λ”°λœ»ν•œ μš°λ¦¬λ“€μ˜ λ§ˆμŒμ„ 더 ν‚€μš°κ³  더 λ‚˜λˆŒ 수 있고 또 그런 것을 μ–΄λ– ν•œ μ œλ„μ  μž₯치둜 잘 보완해 λ‚˜κ°ˆ 수 μžˆμ„κΉŒ
그런 λ¬Έμ œλ“€μ„ ν•˜λ‚˜ν•˜λ‚˜ 이야기 λ‚˜λˆ λ³΄λ„λ‘ ν•˜κ² μŠ΅λ‹ˆλ‹€ λ‚˜λˆ”μ΄ λ„λŒ€μ²΄ μ™œ ν•„μš”ν•œμ§€ 그리고 원둠적인 μ–˜κΈ° κ² μ£ .
그것뢀터 ν•œλ²ˆ μ–˜κΈ°λ₯Ό ν•œλ²ˆ ν•΄ 볼까 ν•©λ‹ˆλ‹€ λ¨Όμ € λ³€ν˜Έμ‚¬λ‹˜κ»˜μ„œ μ–˜κΈ°ν•΄ μ£Όμ‹œκ² μŠ΅λ‹ˆκΉŒ.
자기 ν–‰λ³΅ν•˜κΈ° μœ„ν•΄μ„œμ£ .
{laughing} μ—­μ„€μ μœΌλ‘œ λ“€λ¦½λ‹ˆλ‹€.
사싀 기뢀라든지 λ‚˜λˆ”μ΄λΌλŠ” 게 자기 μ£Όλ¨Έλ‹ˆμ—μ„œ 돈이 λ‚˜κ°€λ‹ˆκΉŒ μžκΈ°ν•œν…Œ 손해가 될 것 같은데 μ‹€μ œλ‘œ λ‚˜λˆ λ³Έ μ‚¬λžŒλ§Œ μ••λ‹ˆλ‹€.
{laughing} 이게 μ–Όλ§ˆλ‚˜ μžκΈ°κ°€ 슀슀둜 ν–‰λ³΅ν•΄μ§€λŠ”μ§€ κ·Έλž˜μ„œ μš”μƒˆ 뭐 λ‚˜λˆ”κΈ°λΆ€μ€‘λ…μ΄λΌλŠ” 말도 μžˆκ΅¬μš”.
또 저희듀이 μ΄λ ‡κ²Œ μ„œμ–‘μ— 뭐 μ΄λ ‡κ²Œ λͺ¨κΈˆμ— κ΄€ν•œ 책을 읽어보면
κΈ°λΆ€ ν•΄ λ³Έ μ‚¬λžŒν•œν…Œ κ°€μ„œ 또 달라고 해라 이게 λͺ¨κΈˆν•˜λŠ” μ‚¬λžŒμ΄ 첫 번째 μ›μΉ™μœΌλ‘œ μ–˜κΈ°ν•΄μš”.
κ·Έ μ–˜κΈ°λŠ” 무슨 μ–˜κΈ°λƒλ©΄ ν•΄λ³Έ μ‚¬λžŒμ΄ μ¦κ±°μš°λ‹ˆκΉŒ λ˜ν•œ κ°€λŠ₯성이 λ§Žλ‹€λŠ” κ±°μ§€μš” μ•„λ§ˆ 이건 해보셔야 이거 μ œκ°€ 아무리 λ§μ”€λ“œλ €λ„ μ†Œμš©μ—†κ΅¬μš”.
μ‹€μ œ λ‚˜λˆ λ³΄μ…”μ•Ό κ·Έ 기쁨 즐거움을 μ•„μ‹œκ²Œ λ©λ‹ˆλ‹€.
κ²°κ΅­μ—λŠ” μžκΈ°ν•œν…Œ λŒμ•„μ˜¨λ‹€ 라고 ν•˜λŠ” 것이 μ„œμ–‘ μ‚¬λžŒλ“€μ—κ²Œ 많이 νŒ½λ°°ν–ˆλŠ”λ° μž₯기기증 같은 κ²½μš°μ—λ„ λ‚΄κ°€ 기증을 ν•˜λ©΄
음 그것이 결ꡭ은 λ‚˜ν•œν…Œ λŒμ•„μ˜¨λ‹€λŠ” κ·Έ μ΄μœ κ°€ 뭐냐 ν•˜λ©΄ λ‚΄κ°€ μ–Έμ œλ“ μ§€ ν™˜μžκ°€ λ˜μ—ˆμ„ λ•Œ
μ‚¬νšŒ μ „λ°˜μ μœΌλ‘œ κ·Έλ ‡κ²Œ κΈ°μ¦ν•˜λŠ” κ·Έ λ¬Έν™”κ°€ ν™•μ‚°λ˜λ©΄ λ‚΄κ°€ ν™˜μžκ°€ 됐을 λ•Œ 그것이 κ²°κ΅­ λ‚˜ν•œν…Œ ν˜œνƒμ΄ λŒμ•„μ˜¨λ‹€ 라고 ν•΄μ„œ
슀페인 같은 κ²½μš°μ—λŠ” 백만 λͺ…λ‹Ή 삼십사 λͺ…μœΌλ‘œ μ „ μ„Έκ³„μ μœΌλ‘œ κ°€μž₯ 많이 기증을 ν•˜κ³  μžˆλŠ”λ°
그런 μ˜μ‹μ΄ 결ꡭ은 λ‚΄κ²Œ λŒμ•„μ˜€λŠ” 것이닀라고 ν•˜λŠ” μ˜μ‹μ΄ νŒ½λ°°ν•˜κΈ° λ•Œλ¬Έμ— κ·Έλ ‡κ²Œ λœλ‹€κ³ ν•΄μš”.
백만 λͺ…λ‹Ή 삼십사 λͺ…μ΄λΌλŠ” 것은 μ‹€μ œ κΈ°μ¦ν•˜λŠ”
예 μˆ«μžκ°€
수치겠죠 그게 이루어지렀면 기증 μ„œμ•½μ€ ꡉμž₯히 더 λ§Žμ€ μ‚¬λžŒλ“€μ΄ ν•˜κ² λ„€μš”.
]"""
formatted_prompt = f"Instruction: {prompt}\n output:"

outputs = pipe_finetuned(
    formatted_prompt,
    temperature=0.1,
    top_k=50,
    top_p=0.95,
    repetition_penalty=1.2,
    add_special_tokens=True,
    streamer = streamer
)

print(outputs[0]["generated_text"][len(formatted_prompt):])

results

제λͺ©: λ‚˜λˆ”μ˜ μ˜λ―Έμ™€ ν•„μš”μ„±μ— λŒ€ν•œ ν† λ‘ 

1. λ‚˜λˆ”μ˜ μ˜λ―Έμ™€ μ€‘μš”μ„±
   - λ‚˜λˆ”μ€ νŠΉμ • λ‚ μ§œμ—, νŠΉμ • μ‚¬λžŒλ“€κ³Ό ν•¨κ»˜ ν•˜λŠ” μ‹œκ°„μ„ μ˜λ―Έν•œλ‹€.
   - νŠΉλ³„νžˆ, ν¬λ¦¬μŠ€λ§ˆμŠ€μ™€ μ‚°νƒ€ν΄λ‘œμŠ€λ₯Ό ν¬ν•¨ν•œ 일뢀 λ‚ μ§œμ—λŠ” κ°€μ‘±κ³Ό μΉœμ§€λ“€κ³Ό ν•¨κ»˜ λ‚˜λˆ”μ„ ν•  수 μžˆλ‹€.
   - λ‚˜λˆ”μ€ κ°€μ‘±κ³Ό μΉœμ§€λ“€κ³Ό ν•¨κ»˜ λ³΄λ‚΄λŠ” μ‹œκ°„μ΄λΌλŠ” μ μ—μ„œ μ€‘μš”ν•˜λ‹€.

2. λ‚˜λˆ”μ˜ ν•„μš”μ„±
   - 곡동체 μ˜μ‹μ΄ λΆ€μ‘±ν•˜λ©°, κΈ°λΆ€ λ¬Έν™”κ°€ μ •μ°©λ˜μ§€ μ•Šμ•˜λ‹€.
   - λ‚˜λˆ”μ˜ μ˜μ‹μ΄ λΆ€μ‘±ν•˜μ—¬, κΈ°λΆ€ λ¬Έν™”κ°€ 잘 λ³΄μ™„λ˜μ§€ μ•Šμ•˜λ‹€.

3. λ‚˜λˆ”μ˜ 원둠적 μ–˜κΈ°
   - λ‚˜λˆ”μ€ κΈ°λΆ€λ‘œλΆ€ν„° μ–»λŠ” 것이 μ•„λ‹ˆλΌ, κΈ°λΆ€λ₯Ό 톡해 μ–»λŠ” 것이 μ•„λ‹ˆλΌ, κΈ°λΆ€λ₯Ό 톡해 μ–»λŠ” 것이 μ•„λ‹ˆλΌ, κΈ°λΆ€λ₯Ό 톡해 μ–»λŠ” κ²ƒμ΄λΌλŠ” μ˜μ‹μ΄ ν•„μš”ν•˜λ‹€.
   - λ‚˜λˆ”μ˜ μ˜μ‹μ„ ν‚€μš°κ³  λ‚˜λˆŒ 수 μžˆλ„λ‘ μ œλ„μ  μž₯μΉ˜κ°€ ν•„μš”ν•˜λ‹€.

4. λ‚˜λˆ”μ˜ μ˜μ‹μ— λŒ€ν•œ λ…Όμ˜
   - λ³€ν˜Έμ‚¬λŠ” λ‚˜λˆ”μ΄ 자기 행볡을 μœ„ν•œ κ²ƒμ΄λΌλŠ” μ˜κ²¬μ„ μ œμ‹œν–ˆλ‹€.
   - λ‚˜λˆ”μ΄ κΈ°λΆ€λ‘œλΆ€ν„° μ–»λŠ” κ²ƒμ΄λΌλŠ” μ˜κ²¬λ„ μ œμ‹œλ˜μ—ˆλ‹€.
   - λ‚˜λˆ”μ΄ κ²°κ΅­ ν™˜μžκ°€ λ˜λŠ” κ²ƒμ΄λΌλŠ” μ˜κ²¬λ„ μ œμ‹œλ˜μ—ˆλ‹€.

Inputs and outputs

  • Input: Text string, such as a question, a prompt, or a document to be summarized.
  • Output: Generated Korea text in response to the input, such an answer to a question, or a summary of a minutes.

Software

Training was done using QLoRA

Usage and Limitations

These models have certain limitations that users should be aware of.

Intended Usage

Open Large Language Models (LLMs) have a wide range of applications across various industries and domains. The following list of potential uses is not comprehensive. The purpose of this list is to provide contextual information about the possible use-cases that the model creators considered as part of model training and development.

  • Content Creation and Communication
    • Text Generation: These models can be used to generate creative text formats such as poems, scripts, code, marketing copy, and email drafts.
  • Research and Education
    • Natural Language Processing (NLP) Research: These models can serve as a foundation for researchers to experiment with NLP techniques, develop algorithms, and contribute to the advancement of the field.
    • Language Learning Tools: Support interactive language learning experiences, aiding in grammar correction or providing writing practice.
    • Knowledge Exploration: Assist researchers in exploring large bodies of text by generating summaries or answering questions about specific topics.

Limitations

  • Training Data
    • The quality and diversity of the training data significantly influence the model's capabilities. Biases or gaps in the training data can lead to limitations in the model's responses.
    • The scope of the training dataset determines the subject areas the model can handle effectively.
  • Context and Task Complexity
    • LLMs are better at tasks that can be framed with clear prompts and instructions. Open-ended or highly complex tasks might be challenging.
    • A model's performance can be influenced by the amount of context provided (longer context generally leads to better outputs, up to a certain point).
  • Language Ambiguity and Nuance
    • Natural language is inherently complex. LLMs might struggle to grasp subtle nuances, sarcasm, or figurative language.
  • Factual Accuracy
    • LLMs generate responses based on information they learned from their training datasets, but they are not knowledge bases. They may generate incorrect or outdated factual statements.
  • Common Sense
    • LLMs rely on statistical patterns in language. They might lack the ability to apply common sense reasoning in certain situations.

Ethical Considerations and Risks

The development of large language models (LLMs) raises several ethical concerns. In creating an open model, we have carefully considered the following:

  • Bias and Fairness
    • LLMs trained on large-scale, real-world text data can reflect socio-cultural biases embedded in the training material. These models underwent careful scrutiny, input data pre-processing described and posterior evaluations reported in this card.
  • Misinformation and Misuse
    • LLMs can be misused to generate text that is false, misleading, or harmful.
    • Guidelines are provided for responsible use with the model, see the Responsible Generative AI Toolkit.
  • Transparency and Accountability:
    • This model card summarizes details on the models' architecture, capabilities, limitations, and evaluation processes.
    • A responsibly developed open model offers the opportunity to share innovation by making LLM technology accessible to developers and researchers across the AI ecosystem.

Risks identified and mitigations:

  • Perpetuation of biases: It's encouraged to perform continuous monitoring (using evaluation metrics, human review) and the exploration of de-biasing techniques during model training, fine-tuning, and other use cases.
  • Generation of harmful content: Mechanisms and guidelines for content safety are essential. Developers are encouraged to exercise caution and implement appropriate content safety safeguards based on their specific product policies and application use cases.
  • Misuse for malicious purposes: Technical limitations and developer and end-user education can help mitigate against malicious applications of LLMs. Educational resources and reporting mechanisms for users to flag misuse are provided. Prohibited uses of Gemma models are outlined in the Gemma Prohibited Use Policy.
  • Privacy violations: Models were trained on data filtered for removal of PII (Personally Identifiable Information). Developers are encouraged to adhere to privacy regulations with privacy-preserving techniques.
Downloads last month
15
Safetensors
Model size
2.51B params
Tensor type
BF16
Β·