CoolFace
Modelpublic

werty1248/Mistral-Nemo-NT-Ko-12B-sft

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
3likes19downloads
Model Card

Mistral-Nemo-NT-Ko-12B-sft

Description

Mistral-Nemo-NT-Ko-12B-sft is an instruction-tuned version of *mistralai/Mistral-Nemo-Base-2407*, fine-tuned across four languages: English, Korean, Chinese, and Japanese.

The primary goals of this model are language alignment, cross-lingual knowledge transfer and ChatML formatting. This is an intermediate version since preference optimization has not yet been applied.

Features

  • —The base model supports a context length of 128K, while I fine-tuned this model with an 8K context size.
  • —The model follows to the input language unless the user explicitly specifies an output language (If the language is set by a system role, it may be ignored).
  • —Answer length tends to vary by language: English responses are generally longer than average, while Korean responses tend to be shorter. The behavior for Japanese and Chinese is still under observation.
  • —Recommended temperature settings: 0.3 to 0.7.

Evaluation

LogicKor

모델방법추론수학글쓰기코딩이해문법싱글턴멀티턴총점
Mistral-Nemo-NT-Ko-12B-sftcot-1-shot7.366.578.718.579.576.437.817.937.87
Mistral-Nemo-NT-Ko-12B-sft1-shot9.005.717.938.297.935.217.297.407.35
Mistral Nemo1-shot5.00,6.506.868.077.648.437.606.577.08
Mistral Nemocot-1-shot5.43,6.866.077.575.867.577.505.626.56
Mistral-Nemo-NT-Ko-12B-sftdefault6.004.935.437.149.714.006.455.956.20
Mistral Nemodefault0.43,7.646.217.146.797.216.265.555.90

MT-Bench

ModelFirstSecondAverage
Mistral-Nemo-NT-Ko-12B-sft8.397.998.19

\* ``judge-model: GPT-4``

Language-Confusion(Korean Only)

ModelMonolingual-LPRMonolingual-WPRCrosslingual-LPRCrosslingual-WPR
Mistral-Nemo-NT-Ko-12B-sft100.00%99.00%87.51%96.96%
Mistral-Nemo-Instruct-240790.72%93.18%46.75%92.84%
Meta-Llama-3.1-8B-Instruct99.00%96.97%91.45%93.01%
gemma-2-9b-it100.00%98.00%87.93%95.58%

example:

<|im_start|>system
You are a helpful AI assistant.<|im_end|>
<|im_start|>user
{prompt}<|im_end|>
<|im_start|>assistant

I trained Mistral-Nemo-NT-Ko-12B with various system prompt from dozens of dataset. You can chat with/without your system prompt.

Dataset

werty1248/multilingual-instruct-balanced

Training Details

  • —GPU: 8xA40
  • —epoch: 3
  • —total batch size: 8
  • —learning rate: 7e-6
  • —weight decay: 0.01

<img src="https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/> <details><summary>See axolotl config</summary>

axolotl version: 0.4.1

yaml
base_model: mistralai/Mistral-Nemo-Base-2407
model_type: MistralForCausalLM
tokenizer_config: nothingiisreal/MN-12B-Celeste-V1.9 ##axolotl-ai-co/Mistral-Nemo-Base-2407-chatml makes error, why?
tokenizer_type: AutoTokenizer

load_in_8bit: false
load_in_4bit: false
strict: false

chat_template: chatml
datasets:
  - path: werty1248/multilingual-instruct-balanced
    type: sharegpt
    chat_template: chatml

dataset_prepared_path: ./data_preparation
output_dir: /workspace/data

hf_use_auth_token: true

sequence_len: 8192
sample_packing: true
pad_to_sequence_len: true

wandb_project:
#wandb_entity:
#wandb_watch:
wandb_name:
#wandb_log_model:

gradient_accumulation_steps: 1 ## total_batch = 8
micro_batch_size: 1
num_epochs: 3
optimizer: paged_adamw_32bit
lr_scheduler: cosine
learning_rate: 0.000007

train_on_inputs: false
group_by_length: false
bf16: auto
fp16: 
tf32: false

gradient_checkpointing: true
early_stopping_patience:
resume_from_checkpoint:
local_rank:
logging_steps: 1
xformers_attention:
flash_attention: true

warmup_steps: 1000
evals_per_epoch: 1
eval_table_size:
save_steps: 1000
debug:
deepspeed: deepspeed_configs/zero3_bf16.json
weight_decay: 0.01
special_tokens:
  pad_token: <pad>

</details><br>

  • —Training loss

image/png