モデル情報

このモデルは「meta-llama/Llama-3.2-1B」をベースに、Instruction-Tuningを実施したモデルです

Ollamaにも公開しているため、こちらからご利用いただけます

https://ollama.com/Areku/Llama-3.2-1B-Instruct-QA-v4

https://ollama.com/Areku/Llama-3.2-1B-Instruct-QA-v4-q4km

下記の2種のライセンス要件を継承します

  • Llama 3.2 Community License
  • CC BY‑NC 4.0

データセット

訓練・検証データセット

  • データソース: https://github.com/tatsu-lab/stanford_alpaca
  • データ件数: 52,002件
  • 言語: 英語
  • データ形式:
    • instruction: モデルが実行すべきタスクで、データセット内部にあるinstructionはそれぞれ一意 str型
    • input: タスクのオプションのコンテキストまたは入力。データ件数のうち約40%に入力がある str型
    • output: text-davinci-003によって生成された、instructionに対する答え str型
  • ライセンス: CC BY NC 4.0

評価データセット

  • データソース: https://huggingface.co/datasets/tatsu-lab/alpaca_eval/blob/main/alpaca_eval.json
  • データ件数: 805件
  • 言語: 英語
  • データ形式:
    • instruction: モデルが実行すべきタスクで、データセット内部にあるinstructionはそれぞれ一意 str型
    • input: タスクのオプションのコンテキストまたは入力。データ件数のうち約40%に入力がある str型
    • output: text-davinci-003によって生成された、instructionに対する答え str型
  • ライセンス: CC BY NC 4.0

利用方法

import torch
from transformers import pipeline

model_id = "ArekuNoimar/Llama-3.2-1B-Instruct-QA-v4"

pipe = pipeline(
    "text-generation",
    model=model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)

messages = [
    {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
    {"role": "user", "content": "Who are you?"},
]

outputs = pipe(
    messages,
    max_new_tokens=2048,
    temperature=0.7,
)
print(outputs[0]["generated_text"][-1])

モデル評価

ROUGE

BERTScore

BLEU

Perplexity

結果

語彙的擬似性(ROUGE, BLEU)

  • n-gram重複度の高い応答生成能力を獲得

意味的擬似性(BERTScore)

  • 公式Instructモデル(Llama-3.2-1B-Instruct)と比較し、僅差(0.1)で優位

言語モデリング能力(Perplexity)

  • ベースモデル(Llama3.2-1B), 比較モデル(Llama3.2-1B-Instruct, Llama3.2-3B, Llama3.2-3B-Instruct, gemma-3-1b-it)と比較し、ファインチューニングモデル(Llama-3.2-1B-Instruct-QA-v4)の値が高く、言語モデルとしての予測性能が低下していることを確認
  • 英語のQAタスクにおける指示追従性能特化により、汎用性が低下
Downloads last month
5
Safetensors
Model size
1B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for yasutoshi-lab/Llama-3.2-1B-Instruct-QA-v4

Finetuned
(788)
this model