Llama-VARCO-8B-Instruct is a generative model built with Llama, specifically designed to excel in Korean through additional training. The model uses continual pre-training with both Korean and English datasets to enhance its understanding and generation capabilites in Korean, while also maintaining its proficiency in English. It performs supervised fine-tuning (SFT) and direct preference optimization (DPO) in Korean to align with human preferences.
We recommend to use transformers v4.43.0 or later, as advised for Llama-3.1.
fromtransformersimportAutoTokenizer,AutoModelForCausalLMimporttorchmodel=AutoModelForCausalLM.from_pretrained("NCSOFT/Llama-VARCO-8B-Instruct",torch_dtype=torch.bfloat16,device_map="auto")tokenizer=AutoTokenizer.from_pretrained("NCSOFT/Llama-VARCO-8B-Instruct")messages=[{"role":"system","content":"You are a helpful assistant Varco. Respond accurately and diligently according to the user's instructions."},{"role":"user","content":"안녕하세요."}]inputs=tokenizer.apply_chat_template(messages,return_tensors="pt").to(model.device)eos_token_id=[tokenizer.eos_token_id,tokenizer.convert_tokens_to_ids("<|eot_id|>")]outputs=model.generate(inputs,eos_token_id=eos_token_id,max_length=8192)print(tokenizer.decode(outputs[0]))
Evaluation
LogicKor
We used the LogicKor code to measure performance. For the judge model, we used the officially recommended gpt-4-1106-preview. The score includes only the 0-shot evaluation provided in the default.