Uploaded model

  • Developed by: fibonacci0112358
  • License: apache-2.0
  • Finetuned from model : llm-jp/llm-jp-3-13b

This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.

サンプルコード'LoRA_template_unsloth_20241127.ipynb'をベースに以下のプログラムでichikara instruction datasetのすべてのデータを質問のtextが重複するもののうち、一つだけを抽出した合成データを作成する。

import os import json

def merge_unique_json_files(input_folder, output_file): seen_texts = set() # 重複チェック用セット merged_data = [] # 結合されたデータを格納

# フォルダ内のすべてのJSONファイルを処理
for filename in os.listdir(input_folder):
    if filename.endswith('.json'):
        file_path = os.path.join(input_folder, filename)
        with open(file_path, 'r', encoding='utf-8') as f:
            try:
                data = json.load(f)
                for item in data:
                    text = item.get('text')
                    if text and text not in seen_texts:
                        seen_texts.add(text)
                        merged_data.append(item)
            except json.JSONDecodeError:
                print(f"Error decoding JSON in file: {file_path}")

# 結果を新しいJSONファイルに保存
with open(output_file, 'w', encoding='utf-8') as f:
    json.dump(merged_data, f, ensure_ascii=False, indent=2)

input_folder = 'ichikara_dataset' # JSONファイルが格納されているフォルダのパス output_file = 'merged_ichikara_dataset.json' # 出力するJSONファイルのパス merge_unique_json_files(input_folder, output_file)

その後、作成した合成データを用いて、サンプルコードに従いfine-tuningを行いモデルを作成した

Downloads last month
6
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for fibonacci0112358/llm-jp-3-13b-finetune-2

Finetuned
(1110)
this model