1作者: rickesh_tn8 个月前
Hi HN, 我构建了一个系统,使用多 GPU 内存溢出,在较旧的 Pascal GPU(P100 + GTX 1080 Ti)上运行 350 亿参数的语言模型。 问题:大多数 LLM 推理工具(Ollama、LM Studio)仅限于单个 GPU VRAM(在 16GB GPU 上最多 130 亿模型)。如果你有多个较旧的 GPU,第二个 GPU 就会闲置。 解决方案:多 GPU + CPU 内存溢出,采用 QLoRA 4 位量化。该系统会自动将层分布在 GPU0 → GPU1 → CPU RAM 上,从而在通常最大只能运行 130 亿参数的硬件上实现 350 亿参数的模型。 基准测试(P100 16GB + GTX 1080 Ti 11GB): - Qwen-14B:每秒 13.7 个 token(9.4GB VRAM) - OPT-30B:每秒 5.4 个 token(15.2GB VRAM) - CodeLlama-34B:每秒 0.8 个 token(16.7GB VRAM) 快速开始: ```bash docker pull rickeshtn/large-model-international_release:latest docker run -it --rm --runtime=nvidia --gpus all --ipc=host --ulimit memlock=-1 --ulimit stack=268435456 -v $(pwd):/workspace -e HF_HOME=/workspace/model_cache rickeshtn/large-model-international_release:latest python /app/interactive_chat.py --model-name Qwen/Qwen2.5-14B-Instruct ``` 技术细节: - QLoRA 4 位 NF4 量化(减少 75% 的内存占用) - HuggingFace Transformers + Accelerate + bitsandbytes - 自动设备映射,带有 CPU 卸载 - 具有对话持久性的交互式聊天 GitHub:https://github.com/rickeshtn/locallm-pascal Docker Hub:https://hub.docker.com/r/rickeshtn/large-model-international_release 已有 34 位用户正在运行。很乐意回答技术问题!
1作者: sshh128 个月前
大家好!分享一个快速的、氛围感十足的游乐场,可以通过API使用sora2模型。<p><a href="https:&#x2F;&#x2F;github.com&#x2F;sshh12&#x2F;sora-2-playground" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sshh12&#x2F;sora-2-playground</a>