以下の内容はhttps://touch-sp.hateblo.jp/entry/2026/02/22/180247より取得しました。


【Arc B580】Qwen3-Swallow-8B-RL-v0.2 を使う(vLLM と llama.cpp の両方で)

はじめに

Qwen3-Swallow-8B-RL-v0.2は東京科学大学が公開している日本語特化のオープンLLM「Swallow」シリーズの一つです。

vLLM

GPTQやAWQで量子化されたモデルも公開されていますが、どちらもIntel Arc B580から使えませんでした。

bitsandbytesで量子化を行ったら使うことができました。

vLLMの導入

こちらの通りにやりました。

実行

vllm serve tokyotech-llm/Qwen3-Swallow-8B-RL-v0.2 \
--reasoning-parser qwen3 \
--quantization bitsandbytes \
--enforce-eager \
--max-model-len 8192

llama.cpp

GGUFを こちら からダウンロードして使いました。

llama.cppの導入

こちらの通りにやりました。

実行

build/bin/llama-server -m /home/hoge/models/Qwen3-Swallow-8B-RL-v0.2-Q4_K_M.gguf \
-n 4096 \
-c 8192 \
--host 127.0.0.1 \
--port 8080

クライアント側

ほとんど同じスクリプトで大丈夫です。

from openai import OpenAI

model_name = "tokyotech-llm/Qwen3-Swallow-8B-RL-v0.2"

'''
# vLLM
client = OpenAI(
    base_url="http://localhost:8000/v1",
    api_key="EMPTY"
)
'''

# llama.cpp
client = OpenAI(
    base_url="http://localhost:8080/v1",
    api_key="EMPTY"
)

result = client.chat.completions.create(
    # In the case of llama.cpp, the model name can be anything.
    model=model_name,
    messages=[
        {"role": "user", "content": "Create a casual one-day Tokyo itinerary in Japanese."}
    ],
    max_tokens=4096,
    temperature=0.6,
    top_p=0.95,
    extra_body={
        "top_k": 20,
        "min_p": 0,
    }
)

'''
# vLLM only
print("Reasoning:")
print(result.choices[0].message.reasoning)
'''

print("\nResponse:")
print(result.choices[0].message.content)



以上の内容はhttps://touch-sp.hateblo.jp/entry/2026/02/22/180247より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14