NTIS's picture
Update README.md
0abcaf8 verified
|
raw
history blame
2.34 kB
metadata
language: ko
license: apache-2.0

1. KONI-Llama3-8B-Instruct-20240729

  • KoRnDAlpaca is based on Korean and fine-tuned with 1 million instruction data (R&D Instruction dataset v1.3) generated from Korean national research reports.
  • The base model of KoRnDAlpaca is EleutherAI/polyglot-en-12.8b.
  • For more information about the training procedure and model, please contact gsjang@kisti.re.kr.

2. How to use the model

import transformers
import torch

model_id = "KISTI-KONI/KONI-Llama3-8B-Instruct-20240729"

pipeline = transformers.pipeline(
    "text-generation",
    model=model_id,
    model_kwargs={"torch_dtype": torch.bfloat16},
    device_map="auto",
)

pipeline.model.eval()

instruction = "CNN๊ณผ RNN ๋ชจ๋ธ์˜ ์ฐจ์ด์ ์„ ์ƒ์„ธํžˆ ์„ค๋ช…ํ•˜๊ณ , ๊ฐ๊ฐ ์ ์šฉ ๊ฐ€๋Šฅํ•œ ๋ถ„์•ผ์— ๋Œ€ํ•ด์„œ๋„ ์„ค๋ช…ํ•˜์‹œ์˜ค."

messages = [
   {"role": "user", "content": f"{instruction}"}
    ]

prompt = pipeline.tokenizer.apply_chat_template(
        messages, 
        tokenize=False, 
        add_generation_prompt=True
)

terminators = [
    pipeline.tokenizer.eos_token_id,
    pipeline.tokenizer.convert_tokens_to_ids("<|eot_id|>")
]

outputs = pipeline(
    prompt,
    max_new_tokens=8192,
    eos_token_id=terminators,
    do_sample=True,
    temperature=0.7,
    top_p=0.9
)

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

3. Data

  • ์•ฝ 1000๊ฐœ์˜ SFT๋ฐ์ดํ„ฐ์™€ ์•ฝ 7000๊ฐœ์˜ DPO ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉ
  • SFT ๋ฐ์ดํ„ฐ๋Š” ์ž์ฒด ๊ตฌ์ถ•ํ•œ ๋ฐ์ดํ„ฐ, huggingface์— ๊ณต๊ฐœ๋œ ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜์˜€์œผ๋ฉฐ, ์˜์–ด์˜ ๊ฒฝ์šฐ ํ•œ๊ตญ์–ด๋กœ ๋ฒˆ์—ญํ•˜์—ฌ ์‚ฌ์šฉ
  • DPO ๋ฐ์ดํ„ฐ๋Š” argilla/dpo-mix-7k๋ฅผ ๋ฒˆ์—ญ ๋ฐ ๊ฒ€์ˆ˜ํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉ

4. Future plans

  • 23.10: Release KoRnDAlpaca v2 (adds the ability to generate long-form technology trend information in Markdown format)
  • 23.12: Release NITS-seachGPT module v1 (Retriever + KoRnDAlpaca v3)
    • โ€ป R&D-specific open-domain question answering module with "Retriever + Generator" structure
    • โ€ป NTIS-searchGPT v1 is an early edition, with anticipated performance improvements scheduled for 2024.
  • 23.12: KoRnDAlpaca v2 will be applied to the chatbot of NTIS (www.ntis.go.kr)

5. Date of last update

  • 2024.07.29

References