Skip to main content
  1. Posts/

Ai Tool

·136 words·1 min· loading · loading · ·
Author
Zhenda
Table of Contents
AI - This article is part of a series.
Part : This Article

[toc]

cuda
#

nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Tue_Mar__8_18:36:24_Pacific_Standard_Time_2022
Cuda compilation tools, release 11.6, V11.6.124
Build cuda_11.6.r11.6/compiler.31057947_0

ollama
#

本地大模型工具


ollama list
ollama ps

ollama run xxx
ollama pull xxx
ollama show xxx
ollama rm xxx

restful api


curl http://localhost:11434/api/embeddings -d '{
  "model": "nomic-embed-text",
  "prompt": "The sky is blue because of Rayleigh scattering"
}'


curl http://localhost:11434/api/chat -d '{
  "model": "llama3",
  "messages": [
    { "role": "user", "content": "why is the sky blue?" }
  ]
}'

curl http://localhost:11434/api/generate -d '{
  "model": "glm4",
  "prompt": "天空是什么颜色?",
  "stream": false
}'

容器访问ollama的地址

http://host.docker.internal:11434
AI - This article is part of a series.
Part : This Article