Deprecated: Method ReflectionProperty::setAccessible() is deprecated since 8.5, as it has no effect since PHP 8.1 in /var/www/html/plugins/system/falangdriver/falangdriver.php on line 534
DeepSeek-Coder模型家族 - Bluetooth forum - bluetooth蓝牙技术

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/components/com_comprofiler/plugin/user/plug_cbjdownloads/cbjdownloads.php on line 49

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/components/com_comprofiler/plugin/user/plug_cbblogs/cbblogs.php on line 48

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/components/com_comprofiler/plugin/user/plug_cbarticles/cbarticles.php on line 47

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 217

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 219

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 227

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 231

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 234

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 237

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 239

DeepSeek-Coder模型家族


Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

  • Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 189

    Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 237

    Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 239
    service
  • [
    Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 189

    Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 237

    Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 239
    service]

  • Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 189

    Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 237

    Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 239
    帖子作者

  • Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 189

    Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 237

    Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 239
    离线
  • 管理员
  • 管理员
更多
2026-01-08 19:14 #1004
Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 189

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 237

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 239
by service
新帖
按大小分类:
  1. 1.3B - 最小,适合测试和低显存环境
  2. 6.7B - 平衡性能与资源,最受欢迎
  3. 33B - 更强大,需要大量显存
  4. 236B - 顶级性能,专业使用
按版本分类:
  1. DeepSeek-Coder V1 (2023年) - 初代版本
  2. DeepSeek-Coder V2 (2024年) - 最新版本,性能大幅提升
  3. DeepSeek-Coder-Instruct - 针对指令优化
  4. DeepSeek-Coder-Lite - 轻量版
🆚 6.7B vs V2的核心区别特性DeepSeek-Coder 6.7BDeepSeek-Coder-V2发布时间2023年2024年(更新)训练数据2万亿tokens6万亿tokens(更丰富)上下文长度16K128K(更长)多语言支持87种编程语言338种编程语言数学推理中等显著提升代码补全良好优秀指令跟随基础大幅改进架构优化标准Transformer改进的注意力机制参数效率标准更高(同样大小性能更好)📊 性能对比text编程任务完成率(HumanEval基准):
┌─────────────────┬─────────┐
│ 模型 │ 得分 │
├─────────────────┼─────────┤
│ DeepSeek-Coder 6.7B │ 68.9% │
│ DeepSeek-Coder-V2-Lite 16B │ 83.2% │
│ DeepSeek-Coder-V2 16B │ 86.8% │
└─────────────────┴─────────┘🎯 实际使用中的区别V2的优势:
  1. 更准确的理解:能更好理解复杂需求
  2. 更长上下文:可以处理更大的代码文件
  3. 更好的代码结构:生成的代码更有条理
  4. 更多注释:自动添加有意义的注释
  5. 错误处理更完善
示例对比:6.7B可能生成:
Code:
def quicksort(arr):     if len(arr) <= 1:         return arr     pivot = arr[0]     left = []     right = []     for x in arr[1:]:         if x < pivot:             left.append(x)         else:             right.append(x)     return quicksort(left) + [pivot] + quicksort(right)
V2可能生成:
Code:
def quicksort(arr: List[int]) -> List[int]:     """     快速排序算法实现          参数:         arr: 需要排序的整数列表              返回:         排序后的整数列表              时间复杂度: O(n log n) 平均情况     空间复杂度: O(log n) 递归栈深度     """     if len(arr) <= 1:         return arr.copy()  # 避免修改原数组          pivot = arr[0]     left = []     right = []          # 分区操作     for x in arr[1:]:         if x < pivot:             left.append(x)         else:             right.append(x)          # 递归排序并合并结果     return quicksort(left) + [pivot] + quicksort(right) # 测试用例 if __name__ == "__main__":     test_cases = [         [3, 6, 8, 10, 1, 2, 1],         [64, 34, 25, 12, 22, 11, 90],         [],         [1]     ]          for arr in test_cases:         sorted_arr = quicksort(arr)         print(f"原数组: {arr} -> 排序后: {sorted_arr}")
💾 Ollama中可用的模型查看所有可用的DeepSeek模型:
Code:
# 搜索Ollama库中的DeepSeek模型 ollama search deepseek
可用的模型包括: # V1系列
ollama pull deepseek-coder:1.3b
ollama pull deepseek-coder:6.7b
ollama pull deepseek-coder:33b

# V2系列
ollama pull deepseek-coder-v2:16b
ollama pull deepseek-coder-v2:236b # 非常大!

# Lite版本(轻量优化)
ollama pull deepseek-coder-v2-lite:16b量化版本(节省显存): # Q4量化(约减少75%显存)
ollama pull deepseek-coder:6.7b-q4_K_M

# Q8量化(高精度)
ollama pull deepseek-coder:6.7b-q8_0🧮 硬件要求对比模型最小显存(FP16)推荐显存系统内存备注1.3B3GB6GB8GB适合入门6.7B14GB16GB16GB平衡选择16B (V2-Lite)32GB40GB+32GB性能优秀33B66GB80GB+64GB专业使用236B472GB512GB+256GB企业级使用量化可大幅降低要求
  • Q4_K_M:约25%的原大小
  • Q8_0:约50%的原大小
🛠️ 在ComfyUI中配置不同模型1. 配置Ollama的不同模型:
Code:
{ "base_url": "http://localhost:11434", "api_key": "", "model_name": "deepseek-coder-v2:16b", // 改为V2 16B "client_type": "ollama" }
2. 完整的工作流配置示例:​​​​​​​
Code:
{ "nodes": [ { "type": "APILLMLoader", "widgets_values": [ "http://localhost:11434", // base_url "", // api_key "deepseek-coder-v2-lite:16b", // model_name - V2 Lite 16B "ollama" // client_type ] }, { "type": "ChatViaAPI", "widgets_values": [ 0.2, // temperature - 代码生成用较低温度 0.95, // top_p 40, // top_k 2048, // max_tokens - V2支持更长输出 true // unload_model_after_chat ] } ] }
🔄 如何在Ollama中切换模型1. 查看已安装的模型:​​​​
Code:
ollama list
2. 运行特定模型: # 测试不同模型
ollama run deepseek-coder:6.7b "写一个快速排序"
ollama run deepseek-coder-v2:16b "写一个快速排序"3. 批量测试脚本:​​​​​​​
Code:
#!/bin/bash # test_models.sh models=( "deepseek-coder:1.3b" "deepseek-coder:6.7b" "deepseek-coder-v2-lite:16b" "deepseek-coder-v2:16b" ) prompt="写一个Python函数,实现二分查找算法,包含详细注释和测试用例" for model in "${models[@]}"; do echo "=== 测试模型: $model ===" ollama run $model "$prompt" echo -e "\n\n" done
🎮 选择建议根据你的需求选择:新手/测试用途: # 推荐:1.3B或6.7B
ollama pull deepseek-coder:1.3b
# 配置简单,速度快日常开发/学习:​​​​​​​# 推荐:6.7B或V2-Lite 16B
ollama pull deepseek-coder:6.7b
# 或
ollama pull deepseek-coder-v2-lite:16b
# 平衡性能与资源
​​​​​​​
专业开发/生产环境: # 推荐:V2 16B
ollama pull deepseek-coder-v2:16b
# 最佳代码质量,支持长上下文硬件受限(显存<8GB):​​​​​​​# 使用量化版本
ollama pull deepseek-coder:1.3b-q4_K_M
# 或
ollama pull deepseek-coder:6.7b-q4_K_M

📈 性能基准测试你可以自己测试:​​​​​​​
Code:
# test_performance.py import time import requests import json def test_model(model_name, prompt): url = "http://localhost:11434/api/generate" payload = { "model": model_name, "prompt": prompt, "stream": False } start = time.time() response = requests.post(url, json=payload) end = time.time() if response.status_code == 200: result = response.json() return { "model": model_name, "time": end - start, "tokens": len(result.get("response", "").split()), "success": True } else: return {"model": model_name, "success": False} # 测试提示词 test_prompt = """用Python实现以下功能: 1. 读取CSV文件 2. 数据清洗(处理缺失值、去重) 3. 计算统计指标(均值、中位数、标准差) 4. 输出到新的CSV文件 要求:代码要完整,有错误处理,有详细注释。""" # 测试多个模型 models = [ "deepseek-coder:1.3b", "deepseek-coder:6.7b", "deepseek-coder-v2-lite:16b", "deepseek-coder-v2:16b" ] for model in models: result = test_model(model, test_prompt) print(f"模型: {result['model']}") print(f"时间: {result.get('time', 'N/A'):.2f}秒") print(f"生成token数: {result.get('tokens', 'N/A')}") print("---")
🚀 推荐方案对于大多数人:​​​​​​​
Code:
# 最佳平衡点 ollama pull deepseek-coder:6.7b # 如果硬件允许,V2-Lite更好 ollama pull deepseek-coder-v2-lite:16b
在ComfyUI中的配置:
Code:
{ "model_name": "deepseek-coder-v2-lite:16b", // 最佳选择 "temperature": 0.2, // 代码生成用低温度 "max_tokens": 2048 // 足够生成长代码 }
💡 小技巧
  1. 先用小模型测试:用1.3B测试工作流是否正常
  2. 逐步升级:确认需要后再下载更大模型
  3. 使用量化:如果显存不足,用
    Code:
    -q4_K_M
    后缀的量化版本
  4. 温度设置:代码生成用0.1-0.3,创意任务用0.7-0.9






















 

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 234

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 237

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 239

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 189

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 237

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 239

登录注册一个帐号 参加讨论

核心: Kunena 论坛
FaLang translation system by Faboba

Deprecated: Method ReflectionProperty::setAccessible() is deprecated since 8.5, as it has no effect since PHP 8.1 in /var/www/html/plugins/system/falangdriver/falangdriver.php on line 100

Deprecated: Method ReflectionProperty::setAccessible() is deprecated since 8.5, as it has no effect since PHP 8.1 in /var/www/html/plugins/system/falangdriver/falangdriver.php on line 100
mysqli object is already closed (500 Whoops, looks like something went wrong.)

Error

HTTP 500 Whoops, looks like something went wrong.

mysqli object is already closed

Exception

Error

  1. */
  2. public function disconnect()
  3. {
  4. // Close the connection.
  5. if (\is_callable([$this->connection, 'close'])) {
  6. $this->connection->close();
  7. }
  8. parent::disconnect();
  9. }
  1. */
  2. public function disconnect()
  3. {
  4. // Close the connection.
  5. if (\is_callable([$this->connection, 'close'])) {
  6. $this->connection->close();
  7. }
  8. parent::disconnect();
  9. }
  1. *
  2. * @since 2.0.0
  3. */
  4. public function __destruct()
  5. {
  6. $this->disconnect();
  7. }
  8. /**
  9. * Alter database's character set.
  10. *
DatabaseDriver->__destruct()

Stack Trace

Error
Error:
mysqli object is already closed

  at /var/www/html/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:318
  at mysqli->close()
     (/var/www/html/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:318)
  at Joomla\Database\Mysqli\MysqliDriver->disconnect()
     (/var/www/html/libraries/vendor/joomla/database/src/DatabaseDriver.php:496)
  at Joomla\Database\DatabaseDriver->__destruct()                

Deprecated: Method ReflectionProperty::setAccessible() is deprecated since 8.5, as it has no effect since PHP 8.1 in /var/www/html/plugins/system/falangdriver/falangdriver.php on line 100

Deprecated: Method ReflectionProperty::setAccessible() is deprecated since 8.5, as it has no effect since PHP 8.1 in /var/www/html/plugins/system/falangdriver/falangdriver.php on line 100