CoolFace
Modelpublic

cpm-ai/Llama3-Ocelot-8B-instruct-v01

sourceHugging Facellama3updated 2y agoView on Hugging Face
0likes30downloads
Model Card

<p align="left"> <img src="https://huggingface.co/cpm-ai/Ocelot-Ko-self-instruction-10.8B-v1.0/resolve/main/ocelot.webp" width="50%"/> <p>

Kor-LLAMA3 Model

Update @ 2024.06.05: First release of Llama3-Ocelot-8B-instruct-v01

<!-- Provide a quick summary of what the model is/does. -->

This model card corresponds to the 8B Instruct version of the Llama-Ko model.

The train wad done on A100-80GB

Resources and Technical Documentation:

  • —llama Model
  • —Orca-Math
  • —ko_Ultrafeedback_binarized

Citation

Model Developers: frcp, nebchi, pepperonipizza97

Model Information

It is an LLM model capable of generating Korean text, trained on a pre-trained base model with high-quality Korean SFT dataset and DPO dataset.

Inputs and outputs
  • —Input: Text string, such as a question, a prompt, or a document to be summarized.
  • —Output: Generated Korean-language text in response to the input, such as an answer to a question, or a summary of a document.
Running the model on a single / multi GPU
python
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("cpm-ai/Ocelot-Ko-self-instruction-10.8B-v1.0")
model = AutoModelForCausalLM.from_pretrained("cpm-ai/Ocelot-Ko-self-instruction-10.8B-v1.0", device_map="auto")

pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, max_new_tokens=4096, streamer=streamer)

text = '대한민국의 수도는 어디인가요?'

messages = [
    {
        "role": "user",
        "content": "{}".format(text)
    }
]

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

outputs = pipe(
    prompt,
    temperature=0.2,
    add_special_tokens=True
)
print(outputs[0]["generated_text"][len(prompt):])

results

python
대한민국의 수도는 서울특별시입니다.
서울특별시에는 청와대, 국회의사당, 대법원 등 대한민국의 주요 정부기관이 위치해 있습니다.
또한 서울시는 대한민국의 경제, 문화, 교육, 교통의 중심지로써 대한민국의 수도이자 대표 도시입니다.제가 도움이 되었길 바랍니다. 더 궁금한 점이 있으시면 언제든지 물어보세요!
bibtex
@misc {cpm-ai/Ocelot-Ko-self-instruction-10.8B-v1.0,
	author       = { {frcp, nebchi, pepperonipizza97} },
	title        = { solar-kor-resume},
	year         = 2024,
	url          = { https://huggingface.co/cpm-ai/Ocelot-Ko-self-instruction-10.8B-v1.0 },
	publisher    = { Hugging Face }
}

Results in LogicKor* are as follows:

ModelSingle turn*Multi turn*Overall*
gemini-1.5-pro-preview-02157.906.267.08
xionic-1-72b-202404047.236.286.76
Ocelot-Instruct6.796.716.75
allganize/Llama-3-Alpha-Ko-8B-Instruct7.146.096.61