分页: 3 / 3

#42 Re: 自己玩DSR1我建议弄14b参数的模型

发表于 : 2025年 2月 1日 19:10
wass
huangchong 写了: 2025年 2月 1日 18:42 ollama api:

https://www.postman.com/postman-student ... a-rest-api
我是说有一个open source vscode extension叫Cline

#43 Re: 自己玩DSR1我建议弄14b参数的模型

发表于 : 2025年 2月 1日 20:17
Pegasi
huangchong 写了: 2025年 2月 1日 17:39 @Pegasi
我下了好几个。如果显卡有8G显存,建议先试试 qwen-7b
我试了下qwen的14b,速度还行,结果惨不忍睹

#44 Re: 自己玩DSR1我建议弄14b参数的模型

发表于 : 2025年 2月 1日 20:18
Pegasi
dramawatcher1 写了: 2025年 2月 1日 14:06 我两块显卡。显存一块11gb 一块8gb。
用 14b , 100%的 GPU
用 32b , 30%/70% 的 CPU/GPU
用 70b , 100% 的 CPU

32b 和 70b 的时候,两块显卡显存占用率都是 80%
30B和70B都在哪下的?

#45 Re: 自己玩DSR1我建议弄14b参数的模型

发表于 : 2025年 2月 1日 20:41
huangchong
Pegasi 写了: 2025年 2月 1日 20:17 我试了下qwen的14b,速度还行,结果惨不忍睹
对llm不可期望过高

#46 Re: 自己玩DSR1我建议弄14b参数的模型

发表于 : 2025年 2月 1日 20:45
huangchong
wass 写了: 2025年 2月 1日 19:10 我是说有一个open source vscode extension叫Cline
哦,看上去有点意思

#47 Re: 自己玩DSR1我建议弄14b参数的模型

发表于 : 2025年 2月 1日 20:48
huangchong
刚刚研究清楚:
ollama 缺省情况下,只给localhost:11434 提供服务。如果想把它做成网络服务,需要在 /etc/systemd/system/ollama.service 里加一句
Environment="OLLAMA_HOST=0.0.0.0"

然后重启机器


代码: 全选

[Service]
Environment="OLLAMA_HOST=0.0.0.0"
ExecStart=/usr/local/bin/ollama serve
User=ollama
Group=ollama

我看网上有个地方也说了wsl怎么设置
https://github.com/ollama/ollama/issues/1431

#48 Re: 自己玩DSR1我建议弄14b参数的模型

发表于 : 2025年 2月 1日 20:53
Pegasi
huangchong 写了: 2025年 2月 1日 20:48 刚刚研究清楚:
ollama 缺省情况下,只给localhost:11434 提供服务。如果想把它做成网络服务,需要在 /etc/systemd/system/ollama.service 里加一句
Environment="OLLAMA_HOST=0.0.0.0"

然后重启机器


我看网上有个地方也说了wsl怎么设置

代码: 全选

[Service]
Environment="OLLAMA_HOST=0.0.0.0"
ExecStart=/usr/local/bin/ollama serve
User=ollama
Group=ollama
我直接让deepseek给写了一个带web ui的,一共20几行

#49 Re: 自己玩DSR1我建议弄14b参数的模型

发表于 : 2025年 2月 1日 21:21
huangchong
Pegasi 写了: 2025年 2月 1日 20:53 我直接让deepseek给写了一个带web ui的,一共20几行
你怎么指挥他的?

#50 Re: 自己玩DSR1我建议弄14b参数的模型

发表于 : 2025年 2月 1日 21:23
Pegasi
huangchong 写了: 2025年 2月 1日 21:21 你怎么指挥他的?
How to set up something like chatgpt or DeepSeek with a local LLM file, on my home network. Show me the code, python preferred.

#51 Re: 自己玩DSR1我建议弄14b参数的模型

发表于 : 2025年 2月 2日 09:51
dramawatcher1
Pegasi 写了: 2025年 2月 1日 20:18 30B和70B都在哪下的?
我用的 ollama

然后用命令

ollama run Deepseek-R1:30b 就会自动下载

其他的模型类似。第一次运行的时候,如果没有,就会自动下载。

https://ollama.com/library/deepseek-r1

#52 Re: 自己玩DSR1我建议弄14b参数的模型

发表于 : 2025年 2月 3日 12:40
Pegasi
dramawatcher1 写了: 2025年 2月 2日 09:51 我用的 ollama

然后用命令

ollama run Deepseek-R1:30b 就会自动下载

其他的模型类似。第一次运行的时候,如果没有,就会自动下载。

https://ollama.com/library/deepseek-r1
14B和30B都是RL蒸馏的Qwen,被洗脑的太厉害了

#54 Re: 自己玩DSR1我建议弄14b参数的模型

发表于 : 2025年 2月 3日 13:23
huangchong
Pegasi 写了: 2025年 2月 3日 12:40 14B和30B都是RL蒸馏的Qwen,被洗脑的太厉害了
确实 ollama的模型名字很误导 lmstudio显示模型的全名 要好一些

#55 Re: 自己玩DSR1我建议弄14b参数的模型

发表于 : 2025年 2月 3日 13:33
wass
huangchong 写了: 2025年 2月 3日 13:23 确实 ollama的模型名字很误导 lmstudio显示模型的全名 要好一些
API还是ollama好用

#56 Re: 自己玩DSR1我建议弄14b参数的模型

发表于 : 2025年 2月 3日 16:30
huangchong
wass 写了: 2025年 2月 3日 13:33 API还是ollama好用
我昨天搞清楚怎么用LM Studio 的命令行lms来做headless server了。


从0.35版的lmstudio开始,lmstudio允许不进图形界面开始网络服务。但是目前0.38,0.39版本有个问题,如果不开图形界面用lms server start企图开服务,就会报错退出。这个现象的原因是LMstudio 从appimage开始跑的话,会先吧程序解压在/tmp/.lmstudio..., 然后还会改写存在.cache/lmstudio里的很多文件,让它们都指向/tmp/.lmstudio,问题是它图形界面退出之后,这个指向的东西就没了。



解决方法是 找个合适的地方,建立一个lmstudio永久目录

代码: 全选

mkdir lmstudio
cd lmstudio
LM-Studio....AppImage       --appimage-extract

来把LM-studio 解压到一个固定的目录, 再用的时候不要跑LM-Studio..AppImage, 而是用在这个固定目录里的lmstudio 可执行文件来跑。
这种情况下 .cache/lmstudio里的设置文件会稳定指向这个固定目录,当用lms server start的时候,它就能找到lmstudio的位置,启动就没问题了。

#57 Re: 自己玩DSR1我建议弄14b参数的模型

发表于 : 2025年 2月 3日 17:39
huangchong
lmstudio管理下载的模型的方式对用户比较友好,不仅在图形界面里让用户自己选,而且下载的模型就是目录加文件名,对人类友好

ollama如果不特意设置,会把下载的模型存在/usr/share/ollama下面的隐藏目录里(我就不知道有什么好藏的),然后文件名还都是hash字符串,人类就算知道它是怎么回事,也得自己开几个文件看看,不直观。


ollama有几个环境变量需要列一下:
export OLLAMA_HOST=0.0.0.0 #允许向任意网络客户地址开放服务,不然的话只能本机用
export OLLAMA_MODELS=/path/to/your/custom/directory #修改默认的模型存放地址

这些变量可以以如下方式加到 /etc/systemd/system/ollama.service 里来控制ollama服务的行为

代码: 全选

#/etc/systemd/system/ollama.service

[Service]
Environment="OLLAMA_HOST=0.0.0.0"
https://github.com/ollama/ollama/blob/main/docs/faq.md

#58 Re: 自己玩DSR1我建议弄14b参数的模型

发表于 : 2025年 2月 3日 17:48
YouHi
蝗虫牛逼啊。

#59 Re: 自己玩DSR1我建议弄14b参数的模型

发表于 : 2025年 2月 4日 02:33
bullogger

#60 Re: 自己玩DSR1我建议弄14b参数的模型

发表于 : 2025年 2月 15日 10:29
wass
玩些什么?

怎么都是pdf打碎,save到chroma,然后rag?

有没有好的open source agent可以看?