Downloads · 30 days
247
100% of all-time downloads
u1w1p/cybercat-lora
cybercat-lora is a machine learning model from u1w1p. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
基于 llama.cpp 的 GGUF 模型微调项目,支持 4-bit MXFP4 量化。
Downloads · 30 days
247
100% of all-time downloads
All-time downloads
247
Public
Repo size
95.6 MB
Likes
0
Public
Click a slice to open those files.
.safetensors128 MB · 99%
From the Hugging Face model README
基于 llama.cpp 的 GGUF 模型微调项目,支持 4-bit MXFP4 量化。
| 组件 | 规格 |
|---|---|
| GPU | RTX 5070 Ti Laptop (12GB VRAM) |
| CPU | Intel Core i9-13900HX |
| RAM | 32GB |
| OS | Windows 11 |
pip install -r requirements.txt
如果需要 GPU 加速推理,确保 CUDA 工具链已安装,llama-cpp-python 会自动编译 CUDA 支持。
C:\cybercat\
├── config.py # 全局配置(GGUF 路径、超参数)
├── train.py # 训练(调用 llama-finetune)
├── continue_train.py # 继续训练
├── evaluate.py # 评估(llama-cpp-python 推理)
├── merge_lora.py # LoRA 合并
├── requirements.txt
├── README.md
├── model/ # GGUF 模型文件目录
├── dataset/ # 训练数据 (train.jsonl)
├── lora/ # LoRA 输出目录
└── logs/ # 评估日志
pip install -r requirements.txt
从 llama.cpp Releases 下载 llama-finetune (或 llama-train) 可执行文件,放入项目目录。
编辑 config.py,确认 GGUF_MODEL_PATH 指向你的 GGUF 文件。
python train.py
python continue_train.py
python evaluate.py
结果保存到 logs/evaluate.txt。
python merge_lora.py
dataset/train.jsonl 使用 messages 格式:
{"messages": [{"role": "user", "content": "你好"}, {"role": "assistant", "content": "你好!"}]}
关键参数(config.py):
| 参数 | 默认 | 说明 |
|---|---|---|
| GGUF_MODEL_PATH | model/*.gguf | GGUF 模型路径 |
| N_GPU_LAYERS | -1 | GPU 加速层数(-1=全GPU,0=纯CPU) |
| N_CTX | 2048 | 上下文长度 |
| LORA_R | 16 | LoRA 秩 |
| LORA_ALPHA | 32 | LoRA alpha |