[ChatStream] mosaicml/mpt-7b-chat用の ChatPrompt

[ChatStream] mosaicml/mpt-7b-chat用の ChatPrompt

本日は mosaicml/mpt-7b-chat 用の ChatPrompt をご紹介します



class ChatPromptMosaicmlMptChat(AbstractChatPrompt):
    """
     mosaicml/mpt-7b-chat
    """

    def __init__(self):
        super().__init__()  # Call the initialization of the base class
        self.set_requester("<human>")
        self.set_responder("<bot>")
        self.set_prefix_as_stop_str_enabled(True)  # enable requester's prompt suffix as stop str

    def create_prompt(self, opts={}):
        """
        Build prompts according to the characteristics of each language model
        :return:
        """
        if self.chat_mode == False:
            return self.get_requester_last_msg()

        ret = self.system
        for chat_content in self.get_contents(opts):
            chat_content_role = chat_content.get_role()
            chat_content_message = chat_content.get_message()

            if chat_content_role:
                if chat_content_message:
                    merged_message = chat_content_role + ": " + chat_content_message + "\n"
                else:
                    merged_message = chat_content_role + ":"

                ret += merged_message

        return ret

    def build_initial_prompt(self, chat_prompt):
        pass
        # If you want a common initial prompt for instructions, override this method and implement
        # chat_prompt.add_requester_msg("Do you know about the Titanic movie?")
        # chat_prompt.add_responder_msg("Yes, I am familiar with it.")
        # chat_prompt.add_requester_msg("Who starred in the movie?")
        # chat_prompt.add_responder_msg("Leonardo DiCaprio and Kate Winslet.")



Read more

【AI×CAD 第1回】設計の3Dデータ、設計部門の外で誰も見られない問題を無料+ブラウザだけで解決する

【AI×CAD 第1回】設計の3Dデータ、設計部門の外で誰も見られない問題を無料+ブラウザだけで解決する

STEPファイルをブラウザで開ける無料の3Dビューワー「CADAS」を公開しました。インストール・登録不要。表示・計測・断面はブラウザ内で処理され、ファイルは外部へ送信されません。CADライセンスのない部門と3Dデータを共有する方法を、実際の画面と実測値で紹介します。

By Qualiteg コンサルティング
TensorRT 10 × Blackwell 移行ガイド【後編】5D grid_sample をカスタムプラグインで通す

TensorRT 10 × Blackwell 移行ガイド【後編】5D grid_sample をカスタムプラグインで通す

こんにちは! 「TensorRT 10 × Blackwell 移行ガイド」シリーズもいよいよ最終回です。前編では TensorRT 化の基本と「5D(volumetric)の grid_sample はビルドが拒否される」という壁を、中編では「ビルドが通っても正しいとは限らない」沈黙劣化の数々を扱いました。 回テーマ 前編(Part 1)RTX 50 で推論資産が動かない — 基本と最初の壁 中編(Part 2)ビルドが通っても正しいとは限らない — 沈黙劣化 5 連発 後編(Part 3)5D grid_sample をカスタムプラグインで通す(本記事) 後編は、前編で保留にした最大の宿題に挑みます。TensorRT がネイティブに対応していない 5D grid_sample を、

By Qualiteg プロダクト開発部
Luckfox Pico Mを外出先から使う。3,750円・64MBのLinuxボードにWireCanalで公開URLをつけるまで

Luckfox Pico Mを外出先から使う。3,750円・64MBのLinuxボードにWireCanalで公開URLをつけるまで

秋葉原で買った3,750円のLinuxボード Luckfox Pico M(RV1103・64MB・USB-Cのみ)を、Web公開用の受信ポートを追加せずにインターネット側から使えるようにするまで。SDカード書き込み、RNDIS経由のネットワーク、WireCanal無料プランでの公開、busybox initでの常駐とブラウザからのLED操作、再起動復帰(33秒)まで実測手順で解説します。

By Qualiteg プロダクト開発部