避雷
我只能说快跑!!!不然就自求多福吧!!!
All I can say is run!! Otherwise, just ask for more blessings!!
我这辈子最后悔的是来了这个学校,上了这个像渡劫一般的学
模型卡:DeepSeek-R1 微调模型 / Model Card for DeepSeek-R1 Fine-Tuned Model
模型概述 / Model Overview
中文:本模型是基于 DeepSeek-R1 7B 的微调版本,专为中文交通违法行为问答任务设计,服务于交通违法行为处理管理系统 https://github.com/tutict/Final-Assignment 。通过 LoRA 微调,模型能够高效回答与交通违法相关的查询,如处罚条款(例如“第二十七条第一项”)。模型已转换为 GGUF 格式(q8_0
量化,8.0 GB),适配 Ollama 进行本地推理。
English: This model is a fine-tuned version of DeepSeek-R1 7B, optimized for Chinese traffic violation Q&A tasks as part of the Traffic Violation Processing System https://github.com/tutict/Final-Assignment . Fine-tuned with LoRA, it efficiently answers queries related to traffic violations, such as penalty clauses (e.g., "Article 27, Item 1"). The model is converted to GGUF format (q8_0
quantization, 8.0 GB) for local inference with Ollama.
模型详情 / Model Details
模型描述 / Model Description
中文:
- 开发者: tutict
- 资助方(可选): 无
- 分享方(可选): tutict
- 模型类型: 基于 Transformer 的生成式语言模型,经过 LoRA 微调
- 语言: 中文(zh)
- 许可证: MIT
- 微调基础模型: unsloth/DeepSeek-R1-Distill-Llama-8B
- 量化:
q8_0
(8 位整数,8.0 GB,显存需求 8-12 GB) - 硬件支持: 测试于 NVIDIA RTX 5080(15.92 GB 显存)
English:
- Developed by: tutict
- Funded by (optional): None
- Shared by (optional): tutict
- Model type: Transformer-based generative language model, fine-tuned with LoRA
- Language(s) (NLP): Chinese (zh)
- License: MIT
- Finetuned from model: unsloth/DeepSeek-R1-Distill-Llama-8B
- Quantization:
q8_0
(8-bit integer, 8.0 GB, 8-12 GB VRAM) - Hardware support: Tested on NVIDIA RTX 5080 (15.92 GB VRAM)
模型来源 / Model Sources
中文:
- 仓库: Hugging Face: 4513P/deepseek-for-my-bishe
- 论文(可选): 无
- 演示(可选): 无
English:
- Repository: Hugging Face: 4513P/deepseek-for-my-bishe
- Paper (optional): None
- Demo (optional): None
用途 / Uses
直接使用 / Direct Use
中文:模型设计用于直接回答中文交通违法相关问题,例如查询处罚条款、违法行为详情等。用户可通过 Ollama 在本地运行模型,适合个人或机构使用。
English: The model is designed for direct use in answering Chinese traffic violation queries, such as penalty clauses or violation details. Users can run it locally with Ollama, suitable for individual or institutional use.
下游使用 / Downstream Use
中文:模型可集成到 Web 或移动应用(如 Spring Boot/Flutter 开发的 UserAppealPage),提供实时交通违法问答服务。支持 API 调用,适配数据库查询。
English: The model can be integrated into web or mobile applications (e.g., UserAppealPage built with Spring Boot/Flutter) for real-time traffic violation Q&A. It supports API integration and database queries.
超出范围使用 / Out-of-Scope Use
中文:模型不适用于非交通违法领域的问答(如通用聊天、法律咨询)。不建议用于生成敏感或违法内容。
English: The model is not suitable for Q&A outside traffic violations (e.g., general chat, legal consulting). It should not be used to generate sensitive or illegal content.
偏见、风险与局限性 / Bias, Risks, and Limitations
中文:
- 数据偏见:数据集(2245 行,约 11225 问答对)可能未覆盖所有交通违法场景,回答可能在罕见案例中不准确。
- 技术局限:
q8_0
量化可能略微降低精度,推理需要 8-12 GB 显存。 - 社会风险:错误回答可能误导用户,需人工验证。
English:
- Data Bias: The dataset (2,245 records, ~11,225 Q&A pairs) may not cover all traffic violation scenarios, potentially leading to inaccurate responses in rare cases.
- Technical Limitations:
q8_0
quantization may slightly reduce accuracy; inference requires 8-12 GB VRAM. - Sociotechnical Risks: Incorrect answers may mislead users, requiring human verification.
建议 / Recommendations
中文:用户应验证模型回答的准确性,尤其在关键场景。建议结合数据库或专家审核。未来可增加数据集覆盖范围或使用 q4_k_m
量化以提高效率。
English: Users should verify the accuracy of responses, especially in critical scenarios. Combine with database checks or expert review. Future improvements include expanding dataset coverage or using q4_k_m
quantization for efficiency.
如何开始使用模型 / How to Get Started with the Model
中文:使用以下代码在本地运行模型:
# 安装 Ollama
# 访问 https://ollama.com/ 下载并安装
# 下载模型文件和 Modelfile
# 从 Hugging Face 仓库获取 deepseek_r1_for_hgl_bishe.gguf 和 Modelfile
# 导入模型
ollama create deepseek-finetuned -f Modelfile
# 运行模型
ollama run deepseek-finetuned
English: Use the following code to run the model locally:
# Install Ollama
# Download and install from https://ollama.com/
# Download model files and Modelfile
# Obtain deepseek_r1_for_hgl_bishe.gguf and Modelfile from the Hugging Face repository
# Import model
ollama create deepseek-finetuned -f Modelfile
# Run model
ollama run deepseek-finetuned
训练详情 / Training Details
训练数据 / Training Data
中文:
- 来源:
市重点站区管委会-交通违法裁量基准.xlsx
(来自北京市公共数据开放平台的 2245 条交通违法记录) - 处理:转换为约 11225 个问答对
English:
- Source: 'Municipal Key Station District Management Committee - Traffic Violation Discretion Benchmark .xlsx' (2,245 traffic violation records from the Beijing Public Data Open Platform)
- Processing: Converts to about 11,225 question and answer pairs
训练过程 / Training Procedure
预处理 / Preprocessing
中文:XLSX 数据清洗后转换为 JSONL 格式(train_data.jsonl
),生成问答对,供 LoRA 微调使用。
English: XLSX data was cleaned and converted to JSONL format (train_data.jsonl
) for LoRA fine-tuning.
训练超参数 / Training Hyperparameters
中文:
- 训练方式:LoRA 微调,bf16 混合精度
- 最大步数:300
- 数据集:约 11225 个问答对
- 环境:WSL,CUDA 12.8,NVIDIA RTX 5080
English:
- Training regime: LoRA fine-tuning, bf16 mixed precision
- Max steps: 300
- Dataset: ~11,225 Q&A pairs
- Environment: WSL, CUDA 12.8, NVIDIA RTX 5080
速度、规模与时间 / Speeds, Sizes, Times
中文:微调约耗时20分钟。GGUF 转换耗时约 1.5 分钟,生成 8.0 GB 文件。
English: Fine-tuning takes about 20 minutes. GGUF conversion took ~1.5 minutes, producing an 8.0 GB file.
评估 / Evaluation
测试数据、因素与指标 / Testing Data, Factors & Metrics
测试数据 / Testing Data
中文:使用训练数据集的子集(约 10%)进行验证,另需手动测试关键问题(如“巡游出租汽车处罚条款”)。
English: A subset (~10%) of the training dataset was used for validation, with manual testing of key questions (e.g., "penalty for taxi violations").
因素 / Factors
中文:评估基于违法行为类型(如超速、违规停车)和问题复杂度(单条款 vs 多条款)。
English: Evaluation based on violation types (e.g., speeding, illegal parking) and question complexity (single vs. multiple clauses).
指标 / Metrics
中文:
- 准确率:回答与数据集答案的一致性
- 响应时间:推理速度(秒/回答)
English:
- Accuracy: Consistency with dataset answers
- Response time: Inference speed (seconds per response)
结果 / Results
中文:待补充(建议测试 Ollama 后记录准确率和速度)。
English: To be added (record accuracy and speed after testing with Ollama).
总结 / Summary
中文:模型在常见交通违法问题上表现良好,需进一步测试边缘案例。
English: The model performs well on common traffic violation queries, with further testing needed for edge cases.
模型分析 / Model Examination
中文:暂无深入分析,建议检查模型对罕见违法行为的泛化能力。
English: No in-depth analysis yet; recommend examining generalization to rare violations.
环境影响 / Environmental Impact
中文:碳排放使用 Machine Learning Impact calculator 估算:
- 硬件类型:NVIDIA RTX 5080
- 使用时长:微调约20分钟,GGUF 转换约 1.5 分钟
- 云服务商:无(本地训练)
- 计算区域:本地(WSL)
- 碳排放:待估算
English: Carbon emissions estimated using the Machine Learning Impact calculator:
- Hardware Type: NVIDIA RTX 5080
- Hours used: Fine-tuning takes about 20 minutes, GGUF conversion ~1.5 minutes
- Cloud Provider: None (local training)
- Compute Region: Local (WSL)
- Carbon Emitted: To be calculated
技术规格 / Technical Specifications
模型架构与目标 / Model Architecture and Objective
中文:基于 Transformer 的 DeepSeek-R1 7B,目标为中文交通违法问答,优化为低显存高效推理。
English: Transformer-based DeepSeek-R1 7B, optimized for Chinese traffic violation Q&A with low-VRAM efficient inference.
计算基础设施 / Compute Infrastructure
硬件 / Hardware
中文:NVIDIA RTX 5080(15.92 GB 显存),支持 CUDA 12.8。
English: NVIDIA RTX 5080 (15.92 GB VRAM), CUDA 12.8 compatible.
软件 / Software
中文:
- 微调:Unsloth, PyTorch
- GGUF 转换:llama.cpp
- 推理:Ollama
- 环境:WSL (Ubuntu)
English:
- Fine-tuning: Unsloth, PyTorch
- GGUF conversion: llama.cpp
- Inference: Ollama
- Environment: WSL (Ubuntu)
引用 / Citation
中文:暂无相关论文,参考 DeepSeek 和 llama.cpp 项目。
English: No associated paper; refer to DeepSeek and llama.cpp projects.
BibTeX:
@misc{deepseek,
title = {DeepSeek-R1-Distill-Llama-8B},
author = {DeepSeek Team},
url = {https://huggingface.co/unsloth/DeepSeek-R1-Distill-Llama-8B}
}
@misc{llamacpp,
title = {llama.cpp},
author = {Georgi Gerganov},
url = {https://github.com/ggerganov/llama.cpp}
}
APA:
- DeepSeek Team. (n.d.). DeepSeek-R1-Distill-Llama-8B. Hugging Face. https://huggingface.co/unsloth/DeepSeek-R1-Distill-Llama-8B
- Gerganov, G. (n.d.). llama.cpp. GitHub. https://github.com/ggerganov/llama.cpp
术语表 / Glossary
中文:
- LoRA:低秩适配,轻量微调技术
- GGUF:高效模型格式,适配本地推理
- Ollama:本地 LLM 推理框架
English:
- LoRA: Low-Rank Adaptation, a lightweight fine-tuning technique
- GGUF: Efficient model format for local inference
- Ollama: Local LLM inference framework
模型卡作者 / Model Card Authors
中文:tutict
English: tutict
联系方式 / Model Card Contact
中文:如有问题,请在 Hugging Face 或 GitHub 仓库提交 issue。
English: For issues, please open an issue on Hugging Face or GitHub.
- Downloads last month
- 21
Model tree for 4513P/deepseek-for-my-bishe
Base model
deepseek-ai/DeepSeek-R1-Distill-Llama-8B