YAML Metadata Warning: The pipeline tag "text2text-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other

概要

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

how to use

# sentencepiece, protobuf, accelerate>=0.26.0, bitsandbytesをインストールしてあることを前提とします。
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

# モデルとトークナイザーをロード
model_name = "DataPilot/gemma2-Intelligent-Investor-5b-v2"  # 好きなモデル名に変更可能
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
2
Safetensors
Model size
5.21B params
Tensor type
F32
·
BF16
·
U8
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

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

Base model

google/gemma-2-9b
Quantized
(149)
this model

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