Qwen2.5 1.5B Instruct(量子化:Q4_K_M)です。
pi01@Pi260506:~ $ curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d '{"messages":[{"role":"user","content":"テスト"}]}'~
{"detail":[{"type":"json_invalid","loc":["body",46],"msg":"JSON decode error","input":{},"ctx":{"error":"Extra data"}}]}pi01@Pi260506:~ $
pi01@Pi260506:~ $
pi01@Pi260506:~ $ curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"messages":[{"role":"user","content":"テスト"}]}'
{"choices":[{"message":{"role":"assistant","content":"すみません、具体的なテストの内容を教えていただけますか?そういった情報があれば、より適切な回答を提供できます。"}}]}pi01@Pi260506:~ $
pi01@Pi260506:~ $ sudo nano /etc/systemd/system/llm-api.service~
pi01@Pi260506:~ $ pi01@Pi260506:~ $
pi01@Pi260506:~ $
pi01@Pi260506:~ $ sudo systemctl daemon-reload
pi01@Pi260506:~ $ sudo systemctl enable llm-api
pi01@Pi260506:~ $ sudo systemctl start llm-api
pi01@Pi260506:~ $ sudo systemctl status llm-api
● llm-api.service - LLM API Server
Loaded: loaded (/etc/systemd/system/llm-api.service; enabled; preset: enabled)
Active: active (running) since Thu 2026-05-07 10:09:56 JST; 5min ago
Invocation: 43f2670ad96a4f468b0e0315707cb3c1
Main PID: 1601 (uvicorn)
Tasks: 7 (limit: 9566)
CPU: 16.733s
CGroup: /system.slice/llm-api.service
└─1601 /home/pi01/llm_api/venv/bin/python3 /home/pi01/llm_api/venv/bin/uvicorn main:app --host 0.0.0.0 --p>
May 07 10:10:04 Pi260506 uvicorn[1601]: INFO: Waiting for application startup.
May 07 10:10:04 Pi260506 uvicorn[1601]: INFO: Application startup complete.
May 07 10:10:04 Pi260506 uvicorn[1601]: INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
May 07 10:10:44 Pi260506 uvicorn[1601]: INFO: 127.0.0.1:45362 - "POST /v1/chat/completions HTTP/1.1" 422 Unprocessa>
May 07 10:11:07 Pi260506 uvicorn[1601]: llama_perf_context_print: load time = 568.81 ms
May 07 10:11:07 Pi260506 uvicorn[1601]: llama_perf_context_print: prompt eval time = 568.52 ms / 30 tokens ( 1>
May 07 10:11:07 Pi260506 uvicorn[1601]: llama_perf_context_print: eval time = 2590.48 ms / 30 runs ( 8>
May 07 10:11:07 Pi260506 uvicorn[1601]: llama_perf_context_print: total time = 3177.08 ms / 60 tokens
May 07 10:11:07 Pi260506 uvicorn[1601]: llama_perf_context_print: graphs reused = 29
May 07 10:11:07 Pi260506 uvicorn[1601]: INFO: 127.0.0.1:54554 - "POST /v1/chat/completions HTTP/1.1" 200 OK
pi01@Pi260506:~ $
pi01@Pi260506:~ $ sudo reboot
pi01@Pi260506:~ $ Connection to pi260506.local closed by remote host.
Connection to pi260506.local closed.
PS C:\Users\user> ssh pi01@pi260506.local
pi01@pi260506.local's password:
Linux Pi260506 6.12.75+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.75-1+rpt1 (2026-03-11) aarch64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu May 7 10:01:00 2026 from fe80::431e:46f6:b4ae:2528%wlan0
pi01@Pi260506:~ $

そしてシステム再起動。
pi01@Pi260506:~ $ sudo reboot
pi01@Pi260506:~ $ Connection to pi260506.local closed by remote host.
Connection to pi260506.local closed.
PS C:\Users\user> ssh pi01@pi260506.local
pi01@pi260506.local's password:
Linux Pi260506 6.12.75+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.75-1+rpt1 (2026-03-11) aarch64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu May 7 10:01:00 2026 from fe80::431e:46f6:b4ae:2528%wlan0
pi01@Pi260506:~ $ sudo systemctl status llm-api
[sudo] password for pi01:
● llm-api.service - LLM API Server
Loaded: loaded (/etc/systemd/system/llm-api.service; enabled; preset: enabled)
Active: active (running) since Thu 2026-05-07 10:15:53 JST; 11min ago
Invocation: 25d35286d6484aa79b8ee977118099b6
Main PID: 1205 (uvicorn)
Tasks: 4 (limit: 9566)
CPU: 4.222s
CGroup: /system.slice/llm-api.service
└─1205 /home/pi01/llm_api/venv/bin/python3 /home/pi01/llm_api/venv/bin/uvicorn main:app --host 0.0.0.0 --p>
May 07 10:16:01 Pi260506 uvicorn[1205]: {%- endfor %}
May 07 10:16:01 Pi260506 uvicorn[1205]: {%- if add_generation_prompt %}
May 07 10:16:01 Pi260506 uvicorn[1205]: {{- '<|im_start|>assistant\n' }}
May 07 10:16:01 Pi260506 uvicorn[1205]: {%- endif %}
May 07 10:16:01 Pi260506 uvicorn[1205]: Using chat eos_token: <|im_end|>
May 07 10:16:01 Pi260506 uvicorn[1205]: Using chat bos_token: <|endoftext|>
May 07 10:16:01 Pi260506 uvicorn[1205]: INFO: Started server process [1205]
May 07 10:16:01 Pi260506 uvicorn[1205]: INFO: Waiting for application startup.
May 07 10:16:01 Pi260506 uvicorn[1205]: INFO: Application startup complete.
May 07 10:16:01 Pi260506 uvicorn[1205]: INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
pi01@Pi260506:~ $ curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d '{"messages":[{"role":"user","content":"自己紹介して"}]}'
{"choices":[{"message":{"role":"assistant","content":"私、AIアシスタントです。あなたのお手伝いをします。"}}]}pi01@Pi260506:~ $