Edit model card

概要

このモデルはin-foxhound-jaを用いて、長期的な視点で、安全域のある優良企業を探し出し、詳細な分析に基づいた投資判断と根拠を示すことを目的に製作されました。

how to use

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

# モデルとトークナイザーをロード
model_name = "DataPilot/gemma2-Intelligent-Investor-5b"  # 好きなモデル名に変更可能
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", torch_dtype=torch.float16) # デバイスを自動的に選択

# Alpaca形式のプロンプトテンプレート
alpaca_prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.

### Instruction:
{}

### Input:
{}

### Response:
{}"""

# 推論を実行
inputs = tokenizer(
    [
        alpaca_prompt.format(
            "あなたは世界最高レベルにある価値投資の達人です。長期的な視点で、安全域のある優良企業を探し出し、詳細な分析に基づいた投資判断と根拠を示すことが得意です。",  # 命令
            "長期投資において優良な企業の条件と長期投資において大切なマインドを教えて下さい。",  # 入力
            "",  # 出力 - 生成の場合は空白にします
        )
    ],
    return_tensors="pt",
).to("cuda")

outputs = model.generate(**inputs, max_new_tokens=1024, use_cache=True)
print(tokenizer.batch_decode(outputs, skip_special_tokens=True))

プロンプトフォーマット

プロンプトフォーマットにはAlpaca形式のプロンプトテンプレートを使用しています。

謝辞

もとデータセットの作成者であるglaive-aiと計算資源を貸してくれたMDLに感謝します。

Downloads last month
17
Safetensors
Model size
5.21B params
Tensor type
F32
·
BF16
·
U8
·
Inference Examples
Unable to determine this model's library. Check the docs .

Model tree for DataPilot/gemma2-Intelligent-Investor-5b

Base model

google/gemma-2-9b
Quantized
this model

Dataset used to train DataPilot/gemma2-Intelligent-Investor-5b