はじめに
CohereForAI/c4ai-command-r-plusを使った記事はこちらです。touch-sp.hatenablog.com
HuggingChatを使って動かしました。
今回はいろいろなモデルをローカルで動かして同じことがうまくいくのか試してみました。
ローカルで動かせるモデルははるかに規模が小さく、また量子化されています。
Temperature, Repeat Penaltyなどのパラメーターは一切変更を加えていません。
モデルの実行はすべてOllama、検証はDifyを使いました。
モデル
〇がついているものがうまくいったもの。×がついているものがうまくいかなかったもの。〇 command-r:35b-v0.1
ollama pull command-r:35b-v0.1-q4_0
parameters: 35.0B quantization: Q4_0 model size: 20GB
× phi3:14b-instruct
ollama pull phi3:14b-instruct
parameters: 14.0B quantization: Q4_0 model size: 7.9GB
× codegemma:7b-v1.1
ollama pull codegemma:7b-v1.1
parameters: 8.5B quantization: Q4_0 model size: 5.0GB
× codegemma:7b-instruct-v1.1
ollama pull codegemma:7b-instruct-v1.1-q8_0
parameters: 8.5B quantization: Q8_0 model size: 9.1GB
結果
試した中では350億パラメータのcommand-rしかうまくいきませんでした。冒頭にも書きましたがパラメーターはデフォルトのままです。パラメーター調整を行えば違う結果になる可能性もあります。小規模モデルで良い結果を出そうと思えばパラメータ調整が重要になってくるということでしょうか。補足
codegemmaを使うときは英語に変換しています。システムプロンプトPlease refer to the following sample program to answer the user's questions. '''python from PySide6.QtWidgets import ( QApplication, QMainWindow, QWidget, QPushButton, QVBoxLayout, QLabel, ) class Window(QMainWindow): def __init__(self): super().__init__() self.initUI() def initUI(self): self.button1 = QPushButton("start") self.button1.clicked.connect(self.button1_pushed) self.label1 = QLabel("bush here!") layout = QVBoxLayout() layout.addWidget(self.list_widget) layout.addWidget(self.button1) mainwidget = QWidget() mainwidget.setLayout(layout) self.setCentralWidget(mainwidget) def button1_pushed(self): None if __name__ == "__main__": app = QApplication([]) window = Window() window.show() app.exec() '''
クエリ
I want to create a GUI with label, label and button from left to right on the first line and label and button from left to right on the second line in pyside6.
![このエントリーをはてなブックマークに追加](https://b.st-hatena.com/images/v4/public/entry-button/button-only@2x.png)