Edit model card

This is a conversion of cyberagent/calm2-7b-chat-dpo-experimental to float16 so you can save space on your hardrive instead of having to download float32 weights of this model.

Original model card:

Model Card for "calm2-7b-chat-dpo-experimental"

cyberagent/calm2-7b-chatcyberagent/chatbot-arena-ja-calm2-7b-chat-experimentalデータセットを用いてDirect Preference Optimization (DPO)をしたモデルです。 DPOにはLow-Rank Adaptation (LoRA)を用いました。

Requirements, Usage, Chat Template

cyberagent/calm2-7b-chatと同様です。 同様のコード・プロンプトで動かすことができます。

import transformers
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer

assert transformers.__version__ >= "4.34.1"

model = AutoModelForCausalLM.from_pretrained("cyberagent/calm2-7b-chat-dpo-experimental", device_map="auto", torch_dtype="auto")
tokenizer = AutoTokenizer.from_pretrained("cyberagent/calm2-7b-chat-dpo-experimental")
streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)

prompt = """USER: AIによって私達の暮らしはどのように変わりますか?
ASSISTANT: """

token_ids = tokenizer.encode(prompt, return_tensors="pt")
output_ids = model.generate(
    input_ids=token_ids.to(model.device),
    max_new_tokens=300,
    do_sample=True,
    temperature=0.8,
    streamer=streamer,
)

実験結果

ELYZA-tasks-100 (GPT-4 eval)

実験結果のランダム性を避けるため、greedy searchで出力しました。

calm2-7b-chat calm2-7b-chat-dpo
2.67 2.85

Japanese MT-Bench

以下の文をシステムプロンプト(system_message)としてcalm2-7b-chat-dpoとcalm2-7b-chatの評価を行いました。

"以下は、タスクを説明する指示と、文脈のある入力の組み合わせです。要求を適切に満たす応答を書きなさい。"

このシステムプロンプトはstabilityai/japanese-stablelm-instruct-alpha-7bを評価するときに使われるものをそのまま使いました。 他のデコーディングパラメータはデフォルトのままです(ランダム性があります)。

calm2-7b-chat calm2-7b-chat-dpo
平均 6.1 6.7
extraction 4.1 5.4
humanities 8.2 8.4
reasoning 3.9 4.3
roleplay 6.4 7.0
stem 6.3 6.2
writing 7.7 9.1

Releases

1.0: v1 release (Jan 24, 2024)

Author

Yuu Jinnai (jinnai_yu@cyberagent.co.jp), Standing on the shoulders of giants

Downloads last month
8
Safetensors
Model size
7.01B params
Tensor type
FP16
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for mpasila/calm2-7b-chat-dpo-experimental-float16

Finetuned
(4)
this model

Dataset used to train mpasila/calm2-7b-chat-dpo-experimental-float16