Downloads · 30 days
7
0% of all-time downloads
ludobico/Ko-Llama3-Luxia-8B-it
Ko-Llama3-Luxia-8B-it is a text generation model from ludobico. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as llama3.
Saltlux, AI Labs 에서 개발한 saltlux/Ko-Llama3-Luxia-8B 모델을 Instruction Fine tuning한 모델입니다. 사용된 데이터셋으로 maywell/kowikidataQA를 사용하였으며 SFTTrainer를 통해 3ep로 학습했습니다. instruction prompt는 Qwen2 모델과 동일하게 적용시켰습니다.
Downloads · 30 days
7
0% of all-time downloads
All-time downloads
22.6K
Public
Parameters
8.2B
49 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt32.7 GB · 67%
From the Hugging Face model README
Saltlux, AI Labs 에서 개발한 saltlux/Ko-Llama3-Luxia-8B 모델을 Instruction Fine tuning한 모델입니다.
사용된 데이터셋으로 maywell/ko_wikidata_QA를 사용하였으며 SFTTrainer를 통해 3ep로 학습했습니다.
instruction prompt는 Qwen2 모델과 동일하게 적용시켰습니다.
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
What is the Qwen2?<|im_end|>
<|im_start|>assistant
Qwen2 is the new series of Qwen large language models<|im_end|>
<|im_start|>user
Tell me more<|im_end|>
<|im_start|>assistant
apply_chat_tempalte이 적용되어있지 않아 랭체인에서 프롬프트로 직접 입력하여 평가해 볼 수 있습니다.
model_id = "lubocido/Ko-Llama3-Luxia-8B-it"
device = "cuda:0"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id,, device_map = device, torch_dtype = torch.bfloat16)
tokenizer.padding_side = 'right'
tokenizer.pad_token = tokenizer.eos_token
sys_message = """당신은 친절한 챗봇으로서 상대방의 요청에 최대한 자세하고 친절하게 답해야합니다.
사용자가 제공하는 정보를 세심하게 분석하여 사용자의 의도를 신속하게 파악하고 그에 따라 답변을 생성해야합니다.
항상 매우 자연스러운 한국어로 응답하세요."""
question = "리눅스에서 프로세스를 죽이는 명령어가 뭐지?"
template = """
<|im_start|>system\n{sys_message}<|im_end|>
<|im_start|>user\n{question}<|im_end|>
<|im_start|>assistant
"""
input_data = {
'sys_message' : sys_message,
'question' : question,
}
prompt = PromptTemplate(template=template, input_variables=['sys_message', 'question'])
pipe = pipeline('text-generation', model=model, tokenizer=tokenizer, device_map=device, do_sample = True, max_length = 512, temperature = 0.1, repetition_penalty=1.2, num_beams=1,top_k=20,top_p=0.9)
langchain_pipeline = HuggingFacePipeline(pipeline=pipe)
chains = LLMChain(llm=langchain_pipeline, prompt=prompt, output_parser=StrOutputParser(), verbose=True)
print(chains.invoke(input=input_data)['text'])
<|im_start|>user
리눅스에서 프로세스를 죽이는 명령어가 뭐지?<|im_end|>
<|im_start|>assistant
프로세스는 운영 체제가 실행 중인 프로그램으로, 프로세스 ID(PID)라는 고유한 식별자를 가지고 있습니다.
프로세스가 종료되면 시스템 자원이 해제됩니다. 리눅스의 경우 kill 명령어를 통해 프로세스를 종료할 수 있으며, 이 명령어는 PID 또는 이름과 같은 다양한 방법으로 프로세스를 찾아서 종료시킬 수 있습니다.
또한 SIGKILL 신호를 보내거나 -9 옵션을 사용하면 강제적으로 프로세스를 종료할 수도 있습니다.
그러나 일부 프로세스는 강제 종료될 때 문제를 일으킬 수 있으므로 주의해서 사용해야 합니다.<|im_end|>