witty-tune-model

581
1
license:apache-2.0
by
openEuler
Other
OTHER
New
581 downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
Unknown
Mobile
Laptop
Server
Quick Summary

AI model with specialized capabilities.

Code Examples

获取模型bash
# 克隆之前请先确认已经安装 git-xet
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/huggingface/xet-core/refs/heads/main/git_xet/install.sh | sh
git xet install
git clone https://huggingface.co/openEuler/witty-tune-model
安装llama.cppbashllama.cpp
# 获取源码,Qwen3需要llama.cpp版本大于等于b5092
git clone https://github.com/ggml-org/llama.cpp
cd llama.cpp
cmake -B build    # 构建CPU推理版本
cmake -B build -DGGML_CUDA=ON    # 构建CUDA推理版本
cmake -B build -DGGML_CANN=on -DCMAKE_BUILD_TYPE=release    # 构建CANN推理版本
cmake --build build --config Release -j $(nproc)
# 测试
./build/bin/llama-cli -m PATH_TO_MODEL -p "Building a website can be done in 10 steps:" -ngl 99
选填:生成文本的最大 token 数,如512或2048bash
# 下载基线模型
pip install modelscope
modelscope download --model Qwen/Qwen3-4B-Instruct-2507 --local_dir ./Qwen3-4B-Instruct-2507
# 或者使用 huggingface
pip install huggingface_hub
huggingface-cli download Qwen/Qwen3-4B-Instruct-2507 --local-dir ./Qwen3-4B-Instruct-2507
LLaMA-Factorybash
# 下载源码
git clone --depth 1 https://github.com/hiyouga/LLaMA-Factory.git
cd LLaMA-Factory

# 创建并激活conda环境
conda create -y -n llamafactory python=3.11
conda activate llamafactory

# 源码安装
# cuda环境
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126 # 可选,根据cuda版本调整下载链接,也可直接执行下面的命令自动检测并部署
pip install -e ".[torch,metrics]" --no-build-isolation
# ascend npu环境
pip install -e ".[torch-npu,metrics]" -i https://pypi.tuna.tsinghua.edu.cn/simple

# 与构建镜像安装
#c uda环境
docker run -it --rm --gpus=all --ipc=host hiyouga/llamafactory:latest   # 该镜像基于 Ubuntu 22.04(x86_64)、CUDA 12.4、Python 3.11、PyTorch 2.6.0 和 Flash-attn 2.7.4 构建。全部镜像:https://hub.docker.com/r/hiyouga/llamafactory/tags
# ascend npu环境(暂时不支持A3型号的ascend产品)
docker pull quay.io/ascend/llamafactory:latest-npu-a2
docker run -dit --ipc=host --network host --name 'llamafactory' --privileged -v /usr/local/Ascend/driver:/usr/local/Ascend/driver  -v /usr/local/Ascend/firmware:/usr/local/Ascend/firmware  -v /usr/local/sbin/:/usr/local/sbin/ -v /home/:/home/ quay.io/ascend/llamafactory:latest-npu-a2
docker exec -it llamafactory bash

# 安装校验
llamafactory-cli env

Deploy This Model

Production-ready deployment in minutes

Together.ai

Instant API access to this model

Fastest API

Production-ready inference API. Start free, scale to millions.

Try Free API

Replicate

One-click model deployment

Easiest Setup

Run models in the cloud with simple API. No DevOps required.

Deploy Now

Disclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.