Run this model with HF Jobs

Run jiwoochris/ko-llama2-v1 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/jiwoochris/ko-llama2-v1. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/jiwoochris/ko-llama2-v1 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/jiwoochris/ko-llama2-v1. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/jiwoochris/ko-llama2-v1. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

ko-llama2-v1

A 13B Korean-English Llama 2 model, instruction-tuned with LoRA on a small, quality-filtered instruction set. On October 28-29, 2023 it ranked #1 on the Open Ko-LLM Leaderboard (230 models on the October 29 snapshot), the Korean LLM benchmark co-hosted on Hugging Face by Upstage and Korea's National Information Society Agency (NIA).

Training data

The model was tuned on 1,944 instruction examples, selected from a much larger pool by a quality-filtering model built for this purpose. The approach follows the less-is-more findings of LIMA (Zhou et al., 2023) and Instruction Mining (Cao et al., 2023): for instruction tuning, data quality matters more than data volume. The filtering model and the selected data are Selectstar property and are not released; the weights are.

Usage

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "jiwoochris/ko-llama2-v1"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")

prompt = "ν•œκ΅­μ˜ μˆ˜λ„λŠ” μ–΄λ””μΈκ°€μš”?"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256, do_sample=True, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

The checkpoint is about 26 GB in fp16 (three shards). Use 8-bit or 4-bit loading for GPUs with less memory.

Evaluation

Ranked first on the Open Ko-LLM Leaderboard on October 28-29, 2023 (230 models on the October 29 snapshot). The leaderboard evaluated Korean adaptations of the Open LLM Leaderboard tasks. Its live space is no longer running, so the ranking is recorded here from the leaderboard snapshot and the AI Times report linked above.

Limitations

This is a research checkpoint from October 2023. It was not trained for safety, can produce incorrect or fabricated content, and inherits the limitations and the license terms of Llama 2 through its base model.

Citation

@misc{jung2023kollama2v1,
  author = {Jung, Jiwoo Chris},
  title  = {ko-llama2-v1: a quality-filtered instruction-tuned Korean-English Llama 2 13B},
  year   = {2023},
  url    = {https://huggingface.co/jiwoochris/ko-llama2-v1}
}
Downloads last month
19
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for jiwoochris/ko-llama2-v1

Finetuned
(1)
this model