davidkim205 / komt-mistral-7b-v1-lora

huggingface.co
Total runs: 10
24-hour runs: -1
7-day runs: -1
30-day runs: 6
Model's Last Updated: October 24 2023
text-generation

Introduction of komt-mistral-7b-v1-lora

Model Details of komt-mistral-7b-v1-lora

komt : korean multi task instruction tuning model

multi task instruction tuning.jpg

Recently, due to the success of ChatGPT, numerous large language models have emerged in an attempt to catch up with ChatGPT's capabilities. However, when it comes to Korean language performance, it has been observed that many models still struggle to provide accurate answers or generate Korean text effectively. This study addresses these challenges by introducing a multi-task instruction technique that leverages supervised datasets from various tasks to create training data for Large Language Models (LLMs).

Model Details
  • Model Developers : davidkim(changyeon kim)
  • Repository : https://github.com/davidkim205/komt
  • Lora target modules : q_proj, o_proj, v_proj, gate_proj, down_proj, k_proj, up_proj
  • Model Size : 84MB
  • Model Architecture : The komt-mistral-7b-v1 is is a fine-tuned version of the Mistral-7B-Instruct-v0.1.
Dataset

korean multi-task instruction dataset

Hardware and Software
  • nvidia driver : 535.54.03
  • CUDA Version: 12.2
Training

Refer https://github.com/davidkim205/komt

Prompt template: Mistral
<s>[INST] {prompt} [/INST]</s>
Usage
import torch

from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
from peft import PeftModel, PeftConfig
from transformers import TextStreamer, GenerationConfig


model='davidkim205/komt-mistral-7b-v1'
peft_model_name = 'davidkim205/komt-mistral-7b-v1-lora'
config = PeftConfig.from_pretrained(peft_model_name)
bnb_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_use_double_quant=True,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_compute_dtype=torch.bfloat16
)
config.base_model_name_or_path =model
model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, quantization_config=bnb_config, device_map="auto")
model = PeftModel.from_pretrained(model, peft_model_name)
tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
streamer = TextStreamer(tokenizer)

def gen(x):
    generation_config = GenerationConfig(
        temperature=0.8,
        top_p=0.8,
        top_k=100,
        max_new_tokens=1024,
        early_stopping=True,
        do_sample=True,
    )
    q = f"[INST]{x} [/INST]"
    gened = model.generate(
        **tokenizer(
            q,
            return_tensors='pt',
            return_token_type_ids=False
        ).to('cuda'),
        generation_config=generation_config,
        pad_token_id=tokenizer.eos_token_id,
        eos_token_id=tokenizer.eos_token_id,
        streamer=streamer,
    )
    result_str = tokenizer.decode(gened[0])

    start_tag = f"[/INST]"
    start_index = result_str.find(start_tag)

    if start_index != -1:
        result_str = result_str[start_index + len(start_tag):].strip()
    return result_str

result = gen('제주도를 1박2일로 혼자 여행하려고 하는데 여행 코스를 만들어줘')

print('##########')
print(result)

output

<s> [INST]제주도를 1박2일로 혼자 여행하려고 하는데 여행 코스를 만들어줘 [/INST]제주도의 아름다운 자연 경관과 문화유산을 느끼고 싶다면 다음과 같은 코스를 추천한다.

첫 번째 코스는 아름다운 해안 경관과 해안사구를 감상하기 위해 제주 서부 해안으로 이동하는 것이다. 제주 시내에서 왼쪽 방향으로 탐나면 한림해수욕장, 성산해수욕장, 봉동해수욕장 등 유명한 해수욕장을 경유할 수 있다. 이 지역은 맑은 바다와 넓은 해안에서 해수욕을 즐길 수 있으며, 해수욕장 주변에는 많은 음식점이 있어 배식을 즐길 수 있다. 서쪽 해안으로 이동하는 동안 제주 대표 사계절 맛집인 허브 수프 및 소라비 등 맛있는 음식을 맛볼 수 있다. 서부 해안을 돌아 다시 제주 시내로 돌아오는 동안 제주 특산품 시장에서 제주 특산품을 살 수 있다.

두 번째 코스는 동부 해안을 돌아보는 것이다. 제주 시내에서 오른쪽 방향으로 탐나면 아이스크림 거리인 한림해수욕장, 성산해수욕장, 봉동해수욕장 등 다시 한 번 유명한 해수욕장을 경유할 수 있다. 이 지역은 해수욕장 주변에는 많은 음식점이 있어 배식을 즐길 수 있다. 동부 해안을 돌아 다시 제주 시내로 돌아오는 동안 제주 특산품 시장에서 제주 특산품을 살 수 있다. 이 지역에는 많은 음식점이 있어 맛있는 음식을 맛볼 수 있다.

세 번째 코스는 제주 남부로 이동하는 것이다. 제주 시내에서 오른쪽 방향으로 탐나면 제주 남부로 이동할 수 있다. 이 지역은 한라산 국립공원이 위치해 있어 자연 경관을 감상할 수 있다. 한라산 국립공원 내에는 다양한 자연 경관과 산악 경로를 즐길 수 있는 탐방 코스가 있다. 또한, 제주 남부는 많은 해수욕장과 골프장이 위치해 있어 해수욕과 골프를 즐길 수 있다. 남부로 이동하는 동안 제주 특산품 시장에서 제주 특산품을 살 수 있다.

Evaluation

For objective model evaluation, we initially used EleutherAI's lm-evaluation-harness but obtained unsatisfactory results. Consequently, we conducted evaluations using ChatGPT, a widely used model, as described in Self-Alignment with Instruction Backtranslation and Three Ways of Using Large Language Models to Evaluate Chat .

model score average(0~5) percentage
gpt-3.5-turbo(close) 147 3.97 79.45%
naver Cue(close) 140 3.78 75.67%
clova X(close) 136 3.67 73.51%
WizardLM-13B-V1.2(open) 96 2.59 51.89%
Llama-2-7b-chat-hf(open) 67 1.81 36.21%
Llama-2-13b-chat-hf(open) 73 1.91 38.37%
nlpai-lab/kullm-polyglot-12.8b-v2(open) 70 1.89 37.83%
kfkas/Llama-2-ko-7b-Chat(open) 96 2.59 51.89%
beomi/KoAlpaca-Polyglot-12.8B(open) 100 2.70 54.05%
komt-llama2-7b-v1 (open)(ours) 117 3.16 63.24%
komt-llama2-13b-v1 (open)(ours) 129 3.48 69.72%
komt-llama-30b-v1 (open)(ours) 129 3.16 63.24%
komt-mistral-7b-v1 (open)(ours) 131 3.54 70.81%

Runs of davidkim205 komt-mistral-7b-v1-lora on huggingface.co

10
Total runs
-1
24-hour runs
0
3-day runs
-1
7-day runs
6
30-day runs

More Information About komt-mistral-7b-v1-lora huggingface.co Model

komt-mistral-7b-v1-lora huggingface.co

komt-mistral-7b-v1-lora huggingface.co is an AI model on huggingface.co that provides komt-mistral-7b-v1-lora's model effect (), which can be used instantly with this davidkim205 komt-mistral-7b-v1-lora model. huggingface.co supports a free trial of the komt-mistral-7b-v1-lora model, and also provides paid use of the komt-mistral-7b-v1-lora. Support call komt-mistral-7b-v1-lora model through api, including Node.js, Python, http.

komt-mistral-7b-v1-lora huggingface.co Url

https://huggingface.co/davidkim205/komt-mistral-7b-v1-lora

davidkim205 komt-mistral-7b-v1-lora online free

komt-mistral-7b-v1-lora huggingface.co is an online trial and call api platform, which integrates komt-mistral-7b-v1-lora's modeling effects, including api services, and provides a free online trial of komt-mistral-7b-v1-lora, you can try komt-mistral-7b-v1-lora online for free by clicking the link below.

davidkim205 komt-mistral-7b-v1-lora online free url in huggingface.co:

https://huggingface.co/davidkim205/komt-mistral-7b-v1-lora

komt-mistral-7b-v1-lora install

komt-mistral-7b-v1-lora is an open source model from GitHub that offers a free installation service, and any user can find komt-mistral-7b-v1-lora on GitHub to install. At the same time, huggingface.co provides the effect of komt-mistral-7b-v1-lora install, users can directly use komt-mistral-7b-v1-lora installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

komt-mistral-7b-v1-lora install url in huggingface.co:

https://huggingface.co/davidkim205/komt-mistral-7b-v1-lora

Url of komt-mistral-7b-v1-lora

komt-mistral-7b-v1-lora huggingface.co Url

Provider of komt-mistral-7b-v1-lora huggingface.co

davidkim205
ORGANIZATIONS

Other API from davidkim205

huggingface.co

Total runs: 38
Run Growth: -47
Growth Rate: -117.50%
Updated:April 04 2024
huggingface.co

Total runs: 16
Run Growth: 0
Growth Rate: 0.00%
Updated:February 24 2025