Downloads · 30 days
11
7% of all-time downloads
iRASC/Meerkat-Ko-8B-d6-w5-dpo
Meerkat-Ko-8B-d6-w5-dpo is a text generation model from iRASC. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
이 모델은 iRASC/Llama-Ko-8B 모델 개발의 후속 연구로 진행되었습니다.
Downloads · 30 days
11
7% of all-time downloads
All-time downloads
155
Public
Parameters
8B
16.7 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors16.1 GB · 95%
From the Hugging Face model README
이 모델은 iRASC/Llama-Ko-8B 모델 개발의 후속 연구로 진행되었습니다.
이 모델은 한국어 의료 질의응답(QA) 성능을 최적화하기 위해 개발된 대규모 언어 모델(LLM)입니다. 특히, 단일 소비자용 GPU(RTX 4090)와 같은 자원 제약 환경에서도 효율적으로 활용될 수 있도록 파라미터 효율적인 방법론을 적용하여 구축되었습니다.
본 모델은 다음과 같은 과정을 통해 생성되었습니다:
dmis-lab/llama-3-meerkat-8b-v1.0과 범용 한국어 모델인 beomi/Llama-3-Open-Ko-8B를 DARE (Drop and Rescale) 기법 (밀도 d=0.6)을 사용하여 병합하였습니다. 이를 통해 영어 의료 지식과 한국어 능력을 효과적으로 결합한 강력한 기반 모델을 구축했습니다.결과적으로, 이 모델은 제한된 자원 하에서도 한국어 의료 관련 질문에 대해 향상된 답변 능력을 보여주도록 최적화되었습니다.
자세한 학습 정보는 여기에서 확인할 수 있습니다
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "iRASC/Meerkat-Ko-8B-d6-w5-dpo"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
messages = [
{"role": "system", "content": "당신은 의료 관련 질문에 답변하는 AI 어시스턴트입니다."},
{"role": "user", "content": "콜레스테롤'이 정확히 무엇인가요? HDL과 LDL은 어떻게 다른가요? "}
]
input_ids = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt"
).to(model.device)
terminators = [
tokenizer.eos_token_id,
tokenizer.convert_tokens_to_ids("<|eot_id|>")
]
outputs = model.generate(
input_ids,
max_new_tokens=1000,
eos_token_id=terminators,
do_sample=True,
temperature=0.7,
)
response = outputs[0][input_ids.shape[-1]:]
print(tokenizer.decode(response, skip_special_tokens=True))