commit 7d90603b239298e803b753693c5880231c139b6a Author: hubian <908234780@qq.com> Date: Thu Apr 9 01:59:09 2026 +0800 feat: ParamHub参数百科Python版 功能: - 模型数据库 (12个模型) - GPU数据库 (10个GPU) - CPU数据库 (8个CPU) - 显存计算器 - 对比工具 - 知识库 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0da3786 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +__pycache__/ +*.pyc +.env +.idea/ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..63b2478 --- /dev/null +++ b/README.md @@ -0,0 +1,71 @@ +# ParamHub - 参数百科 (Python版) + +> AI大模型与硬件参数速查平台 + +## 功能特点 + +- **模型数据库**: GPT-4、Llama、Claude等大模型参数规格 +- **GPU数据库**: H100、A100、RTX 4090等GPU详细规格 +- **CPU数据库**: AMD EPYC、Intel Xeon等服务器CPU参数 +- **实用工具**: 显存计算器、GPU推荐 +- **对比工具**: 多维度对比模型/GPU/CPU +- **知识库**: 参数解释、选型指南 + +## 技术栈 + +- Python 3 + Flask +- Tailwind CSS (CDN) +- RemixIcon + +## 快速开始 + +```bash +# 安装依赖 +pip install -r requirements.txt + +# 运行服务 +python app.py + +# 访问地址 +http://localhost:19010 +``` + +## 目录结构 + +``` +param-hub-python/ +├── app.py # Flask主程序 +├── templates/ # HTML页面 +│ ├── index.html # 首页 +│ ├── models.html # 模型数据库 +│ ├── gpus.html # GPU数据库 +│ ├── cpus.html # CPU数据库 +│ ├── tools.html # 实用工具 +│ ├── compare.html # 对比工具 +│ └── knowledge.html # 知识库 +├── data/ # 数据文件 +│ ├── models.json # 模型数据 +│ ├── gpus.json # GPU数据 +│ └── cpus.json # CPU数据 +├── requirements.txt # Python依赖 +├── run.sh # 启动脚本 +└── README.md # 说明文档 +``` + +## API接口 + +| 接口 | 方法 | 说明 | +|------|------|------| +| `/api/models` | GET | 获取模型列表 | +| `/api/models/` | GET | 获取模型详情 | +| `/api/gpus` | GET | 获取GPU列表 | +| `/api/gpus/` | GET | 获取GPU详情 | +| `/api/cpus` | GET | 获取CPU列表 | +| `/api/cpus/` | GET | 获取CPU详情 | +| `/api/search` | GET | 全局搜索 | +| `/api/calculate/vram` | GET | 显存计算 | +| `/api/stats` | GET | 统计数据 | + +## 版本 + +- v0.1.0 - 初始版本 \ No newline at end of file diff --git a/app.py b/app.py new file mode 100644 index 0000000..ab992b2 --- /dev/null +++ b/app.py @@ -0,0 +1,270 @@ +""" +ParamHub - 参数百科 +AI大模型与硬件参数速查平台 +""" + +from flask import Flask, render_template, jsonify, request +from flask_cors import CORS +import json +from pathlib import Path +from datetime import datetime + +app = Flask(__name__, static_folder='static', static_url_path='/static') +CORS(app) + +# 数据目录 +DATA_DIR = Path(__file__).parent / 'data' +DATA_DIR.mkdir(exist_ok=True) + +# 数据文件 +MODELS_FILE = DATA_DIR / 'models.json' +GPUS_FILE = DATA_DIR / 'gpus.json' +CPUS_FILE = DATA_DIR / 'cpus.json' + +def load_data(file_path): + """加载JSON数据""" + if file_path.exists(): + return json.loads(file_path.read_text(encoding='utf-8')) + return [] + +def save_data(file_path, data): + """保存JSON数据""" + file_path.write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding='utf-8') + +# ============ 页面路由 ============ + +@app.route('/') +def index(): + """首页""" + return render_template('index.html') + +@app.route('/models') +def models_page(): + """模型数据库页面""" + return render_template('models.html') + +@app.route('/gpus') +def gpus_page(): + """GPU数据库页面""" + return render_template('gpus.html') + +@app.route('/cpus') +def cpus_page(): + """CPU数据库页面""" + return render_template('cpus.html') + +@app.route('/tools') +def tools_page(): + """工具页面""" + return render_template('tools.html') + +@app.route('/compare') +def compare_page(): + """对比页面""" + return render_template('compare.html') + +@app.route('/knowledge') +def knowledge_page(): + """知识库页面""" + return render_template('knowledge.html') + +# ============ API路由 ============ + +@app.route('/api/models') +def api_models(): + """获取模型列表""" + models = load_data(MODELS_FILE) + + # 搜索过滤 + keyword = request.args.get('q', '').strip().lower() + if keyword: + models = [m for m in models if keyword in m.get('name', '').lower() or + keyword in m.get('organization', '').lower()] + + # 排序 + sort_by = request.args.get('sort', 'name') + reverse = request.args.get('order', 'asc') == 'desc' + + if sort_by in ['name', 'parameters', 'context_length', 'mmlu']: + models = sorted(models, key=lambda x: x.get(sort_by, 0) or 0, reverse=reverse) + + return jsonify(models) + +@app.route('/api/models/') +def api_model_detail(model_id): + """获取单个模型详情""" + models = load_data(MODELS_FILE) + model = next((m for m in models if m['id'] == model_id), None) + + if not model: + return jsonify({'error': 'Model not found'}), 404 + + return jsonify(model) + +@app.route('/api/models', methods=['POST']) +def api_create_model(): + """创建新模型""" + data = request.get_json() + models = load_data(MODELS_FILE) + + # 生成ID + import uuid + data['id'] = uuid.uuid4().hex[:12] + data['created_at'] = datetime.now().strftime('%Y-%m-%d %H:%M:%S') + + models.append(data) + save_data(MODELS_FILE, models) + + return jsonify(data) + +@app.route('/api/models/', methods=['PUT']) +def api_update_model(model_id): + """更新模型""" + data = request.get_json() + models = load_data(MODELS_FILE) + + model = next((m for m in models if m['id'] == model_id), None) + if not model: + return jsonify({'error': 'Model not found'}), 404 + + model.update(data) + model['updated_at'] = datetime.now().strftime('%Y-%m-%d %H:%M:%S') + save_data(MODELS_FILE, models) + + return jsonify(model) + +@app.route('/api/models/', methods=['DELETE']) +def api_delete_model(model_id): + """删除模型""" + models = load_data(MODELS_FILE) + models = [m for m in models if m['id'] != model_id] + save_data(MODELS_FILE, models) + + return jsonify({'success': True}) + +@app.route('/api/gpus') +def api_gpus(): + """获取GPU列表""" + gpus = load_data(GPUS_FILE) + + keyword = request.args.get('q', '').strip().lower() + if keyword: + gpus = [g for g in gpus if keyword in g.get('name', '').lower() or + keyword in g.get('manufacturer', '').lower()] + + return jsonify(gpus) + +@app.route('/api/gpus/') +def api_gpu_detail(gpu_id): + """获取单个GPU详情""" + gpus = load_data(GPUS_FILE) + gpu = next((g for g in gpus if g['id'] == gpu_id), None) + + if not gpu: + return jsonify({'error': 'GPU not found'}), 404 + + return jsonify(gpu) + +@app.route('/api/cpus') +def api_cpus(): + """获取CPU列表""" + cpus = load_data(CPUS_FILE) + + keyword = request.args.get('q', '').strip().lower() + if keyword: + cpus = [c for c in cpus if keyword in c.get('name', '').lower() or + keyword in c.get('manufacturer', '').lower()] + + return jsonify(cpus) + +@app.route('/api/cpus/') +def api_cpu_detail(cpu_id): + """获取单个CPU详情""" + cpus = load_data(CPUS_FILE) + cpu = next((c for c in cpus if c['id'] == cpu_id), None) + + if not cpu: + return jsonify({'error': 'CPU not found'}), 404 + + return jsonify(cpu) + +@app.route('/api/search') +def api_search(): + """全局搜索""" + keyword = request.args.get('q', '').strip().lower() + + if not keyword: + return jsonify({'models': [], 'gpus': [], 'cpus': []}) + + models = load_data(MODELS_FILE) + gpus = load_data(GPUS_FILE) + cpus = load_data(CPUS_FILE) + + result = { + 'models': [m for m in models if keyword in m.get('name', '').lower() or + keyword in m.get('organization', '').lower()], + 'gpus': [g for g in gpus if keyword in g.get('name', '').lower() or + keyword in g.get('manufacturer', '').lower()], + 'cpus': [c for c in cpus if keyword in c.get('name', '').lower() or + keyword in c.get('manufacturer', '').lower()] + } + + return jsonify(result) + +@app.route('/api/calculate/vram') +def api_calculate_vram(): + """显存计算""" + params = request.args.get('params', '7', type=float) # 参数量(B) + precision = request.args.get('precision', 'fp16', type=str) # 精度 + + # 计算公式 + # FP32: 参数 * 4字节 + # FP16: 参数 * 2字节 + # INT8: 参数 * 1字节 + # INT4: 参数 * 0.5字节 + + bytes_per_param = { + 'fp32': 4, + 'fp16': 2, + 'int8': 1, + 'int4': 0.5 + } + + multiplier = bytes_per_param.get(precision, 2) + vram_gb = params * multiplier * 1e9 / (1024**3) # 转换为GB + + # 加上KV cache和激活值估算(约30%额外开销) + total_vram = vram_gb * 1.3 + + # 推荐GPU + gpus = load_data(GPUS_FILE) + suitable_gpus = [g for g in gpus if g.get('memory_gb', 0) >= total_vram] + + return jsonify({ + 'model_vram': round(vram_gb, 2), + 'total_vram': round(total_vram, 2), + 'suitable_gpus': suitable_gpus + }) + +@app.route('/api/stats') +def api_stats(): + """统计数据""" + models = load_data(MODELS_FILE) + gpus = load_data(GPUS_FILE) + cpus = load_data(CPUS_FILE) + + return jsonify({ + 'models_count': len(models), + 'gpus_count': len(gpus), + 'cpus_count': len(cpus), + 'latest_models': sorted(models, key=lambda x: x.get('created_at', ''), reverse=True)[:5] + }) + +if __name__ == '__main__': + print("=" * 50) + print("ParamHub - 参数百科") + print("=" * 50) + print(f"访问地址: http://localhost:19010") + print("=" * 50) + + app.run(host='0.0.0.0', port=19010, debug=True) \ No newline at end of file diff --git a/data/cpus.json b/data/cpus.json new file mode 100644 index 0000000..7062bf8 --- /dev/null +++ b/data/cpus.json @@ -0,0 +1,10 @@ +[ + {"id": "epyc9654", "name": "AMD EPYC 9654", "manufacturer": "AMD", "architecture": "Zen 4", "cores": 96, "threads": 192, "base_clock_ghz": 2.4, "boost_clock_ghz": 3.7, "l3_cache_mb": 384, "tdp_watts": 360, "price_usd": 11000, "release_year": 2022, "description": "AMD顶级服务器CPU,96核心"}, + {"id": "epyc9554", "name": "AMD EPYC 9554", "manufacturer": "AMD", "architecture": "Zen 4", "cores": 64, "threads": 128, "base_clock_ghz": 3.1, "boost_clock_ghz": 3.8, "l3_cache_mb": 256, "tdp_watts": 360, "price_usd": 6800, "release_year": 2022, "description": "64核心高性能服务器CPU"}, + {"id": "epyc9454", "name": "AMD EPYC 9454", "manufacturer": "AMD", "architecture": "Zen 4", "cores": 48, "threads": 96, "base_clock_ghz": 2.75, "boost_clock_ghz": 3.8, "l3_cache_mb": 192, "tdp_watts": 290, "price_usd": 4100, "release_year": 2022, "description": "48核心服务器CPU"}, + {"id": "xeonw9359x", "name": "Intel Xeon w9-3595X", "manufacturer": "Intel", "architecture": "Sapphire Rapids", "cores": 56, "threads": 112, "base_clock_ghz": 1.9, "boost_clock_ghz": 4.8, "l3_cache_mb": 105, "tdp_watts": 350, "price_usd": 6200, "release_year": 2023, "description": "Intel顶级工作站CPU"}, + {"id": "xeonw5345", "name": "Intel Xeon w5-3435", "manufacturer": "Intel", "architecture": "Sapphire Rapids", "cores": 24, "threads": 48, "base_clock_ghz": 3.1, "boost_clock_ghz": 4.7, "l3_cache_mb": 45, "tdp_watts": 230, "price_usd": 950, "release_year": 2023, "description": "中端工作站CPU"}, + {"id": "ryzen97950x", "name": "AMD Ryzen 9 7950X", "manufacturer": "AMD", "architecture": "Zen 4", "cores": 16, "threads": 32, "base_clock_ghz": 4.5, "boost_clock_ghz": 5.7, "l3_cache_mb": 64, "tdp_watts": 170, "price_usd": 550, "release_year": 2022, "description": "顶级消费级CPU,适合AI开发"}, + {"id": "ryzen97950x3d", "name": "AMD Ryzen 9 7950X3D", "manufacturer": "AMD", "architecture": "Zen 4", "cores": 16, "threads": 32, "base_clock_ghz": 4.2, "boost_clock_ghz": 5.7, "l3_cache_mb": 144, "tdp_watts": 120, "price_usd": 700, "release_year": 2023, "description": "带3D V-Cache,游戏性能更强"}, + {"id": "intel14900k", "name": "Intel Core i9-14900K", "manufacturer": "Intel", "architecture": "Raptor Lake Refresh", "cores": 24, "threads": 32, "base_clock_ghz": 3.2, "boost_clock_ghz": 6.0, "l3_cache_mb": 36, "tdp_watts": 125, "price_usd": 580, "release_year": 2023, "description": "Intel顶级消费级CPU"} +] \ No newline at end of file diff --git a/data/gpus.json b/data/gpus.json new file mode 100644 index 0000000..fab2f1e --- /dev/null +++ b/data/gpus.json @@ -0,0 +1,12 @@ +[ + {"id": "h100", "name": "NVIDIA H100", "manufacturer": "NVIDIA", "architecture": "Hopper", "cuda_cores": 16896, "tensor_cores": 528, "memory_gb": 80, "memory_bandwidth_gbs": 3352, "fp32_tflops": 67, "fp16_tflops": 1979, "int8_perf_tops": 3958, "price_usd": 30000, "release_year": 2022, "description": "数据中心顶级GPU,专为AI训练设计"}, + {"id": "a100", "name": "NVIDIA A100", "manufacturer": "NVIDIA", "architecture": "Ampere", "cuda_cores": 6912, "tensor_cores": 432, "memory_gb": 80, "memory_bandwidth_gbs": 2039, "fp32_tflops": 19.5, "fp16_tflops": 312, "int8_perf_tops": 624, "price_usd": 10000, "release_year": 2020, "description": "数据中心主力GPU,AI训练推理通用"}, + {"id": "a10040g", "name": "NVIDIA A100 40GB", "manufacturer": "NVIDIA", "architecture": "Ampere", "cuda_cores": 6912, "tensor_cores": 432, "memory_gb": 40, "memory_bandwidth_gbs": 1555, "fp32_tflops": 19.5, "fp16_tflops": 312, "int8_perf_tops": 624, "price_usd": 6000, "release_year": 2020, "description": "A100 40GB版本,性价比更高"}, + {"id": "l40s", "name": "NVIDIA L40S", "manufacturer": "NVIDIA", "architecture": "Ada Lovelace", "cuda_cores": 18176, "tensor_cores": 568, "memory_gb": 48, "memory_bandwidth_gbs": 864, "fp32_tflops": 91.6, "fp16_tflops": 362, "int8_perf_tops": 724, "price_usd": 7000, "release_year": 2023, "description": "新一代数据中心GPU,推理优化"}, + {"id": "rtx4090", "name": "NVIDIA RTX 4090", "manufacturer": "NVIDIA", "architecture": "Ada Lovelace", "cuda_cores": 16384, "tensor_cores": 512, "memory_gb": 24, "memory_bandwidth_gbs": 1008, "fp32_tflops": 82.6, "fp16_tflops": 330, "int8_perf_tops": 660, "price_usd": 1600, "release_year": 2022, "description": "消费级最强GPU,适合个人AI开发"}, + {"id": "rtx4090d", "name": "NVIDIA RTX 4090D", "manufacturer": "NVIDIA", "architecture": "Ada Lovelace", "cuda_cores": 14592, "tensor_cores": 456, "memory_gb": 24, "memory_bandwidth_gbs": 1008, "fp32_tflops": 73.5, "fp16_tflops": 294, "int8_perf_tops": 588, "price_usd": 1400, "release_year": 2024, "description": "4090中国特供版,性能略降"}, + {"id": "rtx3090", "name": "NVIDIA RTX 3090", "manufacturer": "NVIDIA", "architecture": "Ampere", "cuda_cores": 10496, "tensor_cores": 328, "memory_gb": 24, "memory_bandwidth_gbs": 936, "fp32_tflops": 35.6, "fp16_tflops": 142, "int8_perf_tops": 284, "price_usd": 1200, "release_year": 2020, "description": "上一代旗舰,性价比高"}, + {"id": "rtx3080", "name": "NVIDIA RTX 3080", "manufacturer": "NVIDIA", "architecture": "Ampere", "cuda_cores": 8704, "tensor_cores": 272, "memory_gb": 10, "memory_bandwidth_gbs": 760, "fp32_tflops": 29.8, "fp16_tflops": 119, "int8_perf_tops": 238, "price_usd": 700, "release_year": 2020, "description": "中高端消费级GPU"}, + {"id": "v100", "name": "NVIDIA V100", "manufacturer": "NVIDIA", "architecture": "Volta", "cuda_cores": 5120, "tensor_cores": 640, "memory_gb": 32, "memory_bandwidth_gbs": 900, "fp32_tflops": 14.8, "fp16_tflops": 118, "int8_perf_tops": 236, "price_usd": 4000, "release_year": 2017, "description": "上一代数据中心GPU,仍有价值"}, + {"id": "mi300x", "name": "AMD MI300X", "manufacturer": "AMD", "architecture": "CDNA 3", "cuda_cores": 0, "tensor_cores": 304, "memory_gb": 192, "memory_bandwidth_gbs": 5300, "fp32_tflops": 81.7, "fp16_tflops": 1307, "int8_perf_tops": 2614, "price_usd": 15000, "release_year": 2023, "description": "AMD最强AI GPU,192GB显存"} +] \ No newline at end of file diff --git a/data/models.json b/data/models.json new file mode 100644 index 0000000..29c1390 --- /dev/null +++ b/data/models.json @@ -0,0 +1,14 @@ +[ + {"id": "gpt4", "name": "GPT-4", "organization": "OpenAI", "parameters": 1760, "architecture": "Transformer", "context_length": 8192, "input_price": 0.03, "output_price": 0.06, "mmlu": 86.4, "humaneval": 67.0, "is_open_source": false, "license": "Proprietary", "description": "OpenAI最强大的多模态大模型", "created_at": "2024-01-01"}, + {"id": "gpt4turbo", "name": "GPT-4 Turbo", "organization": "OpenAI", "parameters": 1760, "architecture": "Transformer", "context_length": 128000, "input_price": 0.01, "output_price": 0.03, "mmlu": 86.4, "humaneval": 67.0, "is_open_source": false, "license": "Proprietary", "description": "GPT-4增强版,128K上下文", "created_at": "2024-01-01"}, + {"id": "gpt35", "name": "GPT-3.5 Turbo", "organization": "OpenAI", "parameters": 175, "architecture": "Transformer", "context_length": 16385, "input_price": 0.0005, "output_price": 0.0015, "mmlu": 70.0, "humaneval": 48.1, "is_open_source": false, "license": "Proprietary", "description": "性价比高的通用模型", "created_at": "2024-01-01"}, + {"id": "claude3opus", "name": "Claude 3 Opus", "organization": "Anthropic", "parameters": 400, "architecture": "Transformer", "context_length": 200000, "input_price": 0.015, "output_price": 0.075, "mmlu": 86.8, "humaneval": 84.9, "is_open_source": false, "license": "Proprietary", "description": "Anthropic最强模型,200K上下文", "created_at": "2024-01-01"}, + {"id": "claude3sonnet", "name": "Claude 3 Sonnet", "organization": "Anthropic", "parameters": 175, "architecture": "Transformer", "context_length": 200000, "input_price": 0.003, "output_price": 0.015, "mmlu": 79.0, "humaneval": 73.0, "is_open_source": false, "license": "Proprietary", "description": "平衡性能与成本", "created_at": "2024-01-01"}, + {"id": "llama270b", "name": "Llama 2 70B", "organization": "Meta", "parameters": 70, "architecture": "Transformer", "context_length": 4096, "input_price": 0, "output_price": 0, "mmlu": 69.8, "humaneval": 29.9, "is_open_source": true, "license": "Llama 2 Community", "description": "Meta开源大模型,70B参数", "created_at": "2024-01-01"}, + {"id": "llama3", "name": "Llama 3 70B", "organization": "Meta", "parameters": 70, "architecture": "Transformer", "context_length": 8192, "input_price": 0, "output_price": 0, "mmlu": 82.0, "humaneval": 81.7, "is_open_source": true, "license": "Llama 3 Community", "description": "Meta最新开源模型,性能接近GPT-4", "created_at": "2024-01-01"}, + {"id": "mistral7b", "name": "Mistral 7B", "organization": "Mistral AI", "parameters": 7, "architecture": "Transformer", "context_length": 32768, "input_price": 0, "output_price": 0, "mmlu": 62.5, "humaneval": 26.8, "is_open_source": true, "license": "Apache 2.0", "description": "小巧高效的开源模型", "created_at": "2024-01-01"}, + {"id": "mixtral8x7b", "name": "Mixtral 8x7B", "organization": "Mistral AI", "parameters": 47, "architecture": "MoE", "context_length": 32768, "input_price": 0, "output_price": 0, "mmlu": 70.6, "humaneval": 40.2, "is_open_source": true, "license": "Apache 2.0", "description": "MoE架构,高效推理", "created_at": "2024-01-01"}, + {"id": "qwen72b", "name": "Qwen 72B", "organization": "Alibaba", "parameters": 72, "architecture": "Transformer", "context_length": 32768, "input_price": 0, "output_price": 0, "mmlu": 83.1, "humaneval": 65.4, "is_open_source": true, "license": "Apache 2.0", "description": "阿里开源大模型,中文能力强", "created_at": "2024-01-01"}, + {"id": "deepseekv3", "name": "DeepSeek V3", "organization": "DeepSeek", "parameters": 685, "architecture": "MoE", "context_length": 128000, "input_price": 0.00014, "output_price": 0.00028, "mmlu": 88.5, "humaneval": 86.2, "is_open_source": true, "license": "MIT", "description": "DeepSeek最新模型,性价比极高", "created_at": "2024-01-01"}, + {"id": "glm4", "name": "GLM-4", "organization": "Zhipu AI", "parameters": 130, "architecture": "Transformer", "context_length": 128000, "input_price": 0.014, "output_price": 0.014, "mmlu": 81.0, "humaneval": 70.0, "is_open_source": false, "license": "Proprietary", "description": "智谱AI大模型,中文能力强", "created_at": "2024-01-01"} +] \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..70114e3 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +flask +flask-cors \ No newline at end of file diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..23afaa8 --- /dev/null +++ b/run.sh @@ -0,0 +1,3 @@ +#!/bin/bash +cd "$(dirname "$0")" +python3 app.py \ No newline at end of file diff --git a/templates/compare.html b/templates/compare.html new file mode 100644 index 0000000..1dddda1 --- /dev/null +++ b/templates/compare.html @@ -0,0 +1,208 @@ + + + + + + 对比工具 - ParamHub + + + + + + + +
+
+

+ + 对比工具 +

+

多维度对比模型或硬件参数

+
+ + +
+
+ + + +
+
+ + +
+
+ + +
+
+ + +
+
+ + + +
+ + + + \ No newline at end of file diff --git a/templates/cpus.html b/templates/cpus.html new file mode 100644 index 0000000..faf3ffd --- /dev/null +++ b/templates/cpus.html @@ -0,0 +1,186 @@ + + + + + + CPU数据库 - ParamHub + + + + + + + +
+
+

+ + CPU数据库 +

+

处理器规格参数一览

+
+ +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + + + +
CPU名称厂商核心/线程主频L3缓存TDP价格操作
加载中...
+
+
+ + + + + + \ No newline at end of file diff --git a/templates/gpus.html b/templates/gpus.html new file mode 100644 index 0000000..f73ec95 --- /dev/null +++ b/templates/gpus.html @@ -0,0 +1,193 @@ + + + + + + GPU数据库 - ParamHub + + + + + + + +
+
+

+ + GPU数据库 +

+

显卡规格参数一览

+
+ + +
+
+ + +
+
+ + +
+ + + + + + + + + + + + + + + + +
GPU名称厂商架构显存CUDA核心FP16性能价格操作
加载中...
+
+
+ + + + + + + \ No newline at end of file diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..8c9d14c --- /dev/null +++ b/templates/index.html @@ -0,0 +1,168 @@ + + + + + + ParamHub - 参数百科 + + + + + + + + +
+ +
+
+
+ + +
+ +
+
+ + +
+
+
+ +
+
-
+
AI模型
+
+
+
+
+
+ +
+
-
+
GPU显卡
+
+
+
+
+
+ +
+
-
+
CPU处理器
+
+
+
+
+ + + + + +
+

+ + 热门模型 +

+
+
加载中...
+
+
+
+ + +
+ ParamHub - 参数百科 | AI模型与硬件参数速查平台 +
+ + + + \ No newline at end of file diff --git a/templates/knowledge.html b/templates/knowledge.html new file mode 100644 index 0000000..1531266 --- /dev/null +++ b/templates/knowledge.html @@ -0,0 +1,187 @@ + + + + + + 知识库 - ParamHub + + + + + + +
+
+

+ + 知识库 +

+

AI模型参数与硬件知识

+
+ +
+ +
+

+ + 什么是参数量? +

+

+ 参数量(Parameters)是衡量大模型规模的指标,表示模型中权重参数的数量。 + 例如 GPT-3 有 175B 参数,即约1750亿个参数。 +

+
+
常见规模分类:
+
    +
  • • 小模型:<1B (适合边缘设备)
  • +
  • • 中模型:1B-10B (消费级GPU可运行)
  • +
  • • 大模型:10B-100B (需要多GPU)
  • +
  • • 超大模型:>100B (需要数据中心)
  • +
+
+
+ + +
+

+ + 什么是上下文长度? +

+

+ 上下文长度(Context Length)是模型能处理的输入文本最大长度。 + 更长的上下文意味着模型可以理解更长的文档或对话历史。 +

+
+
常见长度:
+
    +
  • • 4K:传统长度,适合简单对话
  • +
  • • 32K:中等长度,适合长文档
  • +
  • • 128K:超长上下文,如GPT-4 Turbo
  • +
  • • 200K:Claude 3的极限长度
  • +
+
+
+ + +
+

+ + 如何计算显存需求? +

+

+ 模型显存需求 ≈ 参数量 × 每参数字节数 × 1.3(含KV Cache开销) +

+
+
计算公式:
+
    +
  • • FP32: 参数量 × 4字节 × 1.3
  • +
  • • FP16: 参数量 × 2字节 × 1.3
  • +
  • • INT8: 参数量 × 1字节 × 1.3
  • +
  • • INT4: 参数量 × 0.5字节 × 1.3
  • +
+
+
+ + +
+

+ + 什么是量化? +

+

+ 量化(Quantization)是将模型参数从高精度转换为低精度,减少显存占用和计算量。 + 如FP16→INT8→INT4,精度损失可控,资源节省显著。 +

+
+
量化效果:
+
    +
  • • FP32→FP16: 显存减半,精度基本不变
  • +
  • • FP16→INT8: 显存再减半,精度略降
  • +
  • • INT8→INT4: 显存再减半,需特殊技术
  • +
+
+
+ + +
+

+ + 什么是MMLU? +

+

+ MMLU(Massive Multitask Language Understanding)是评估大模型综合能力的标准测试集, + 覆盖57个学科领域,分数越高代表模型知识面越广。 +

+
+
分数参考:
+
    +
  • • 60-70%:入门级,如GPT-3
  • +
  • • 70-80%:中等水平,如Llama 2 70B
  • +
  • • 80-90%:优秀水平,如GPT-4、Claude 3
  • +
+
+
+ + +
+

+ + 什么是HumanEval? +

+

+ HumanEval是评估模型代码能力的测试集,包含164个编程题目。 + 分数表示模型能正确完成的题目比例。 +

+
+
分数参考:
+
    +
  • • 20-30%:基础代码能力
  • +
  • • 40-50%:中等代码能力
  • +
  • • 80%+:优秀代码能力,如Claude 3 Opus
  • +
+
+
+
+ + +
+

+ + GPU选型指南 +

+ + + + + + + + + + + + + + + +
需求场景推荐GPU显存需求预算范围
个人学习/推理7BRTX 3060 12GB12-16GB$300
个人开发/推理13BRTX 3090/409024GB$700-$1600
小团队训练/推理70BA100 40GB x280GB$12,000
企业训练大模型H100 80GB集群数百GB$30,000+
+
+
+ + \ No newline at end of file diff --git a/templates/models.html b/templates/models.html new file mode 100644 index 0000000..33b73a2 --- /dev/null +++ b/templates/models.html @@ -0,0 +1,240 @@ + + + + + + 模型数据库 - ParamHub + + + + + + + +
+ +
+

+ + 模型数据库 +

+

AI大模型参数规格一览

+
+ + +
+
+
+ + +
+ + + +
+
+ + +
+ + + + + + + + + + + + + + + + +
模型名称厂商参数量上下文MMLU类型价格操作
加载中...
+
+
+ + + + + + + \ No newline at end of file diff --git a/templates/tools.html b/templates/tools.html new file mode 100644 index 0000000..dcc6038 --- /dev/null +++ b/templates/tools.html @@ -0,0 +1,174 @@ + + + + + + 实用工具 - ParamHub + + + + + + + +
+
+

+ + 实用工具 +

+

AI开发常用计算工具

+
+ + +
+

+ + 显存计算器 +

+

计算大模型所需的显存大小,并推荐合适的GPU

+ +
+
+ + +
+
+ + +
+
+ +
+
+ + + +
+ + +
+

+ + 精度与显存关系 +

+
+
+
FP32
+
4字节
+
全精度,最高精度
+
+
+
FP16
+
2字节
+
半精度,常用
+
+
+
INT8
+
1字节
+
8位量化
+
+
+
INT4
+
0.5字节
+
4位量化,最小
+
+
+
+ + +
+

+ + 常见模型显存需求参考 (FP16) +

+ + + + + + + + + + + + + + + + + +
模型参数量模型权重推荐显存推荐GPU
Mistral 7B7B14GB18GBRTX 3090/4090
Llama 2 13B13B26GB34GBRTX 4090 + 8GB
Llama 2 70B70B140GB182GBA100 80GB x2
Mixtral 8x7B47B94GB122GBA100 80GB x2
Qwen 72B72B144GB187GBH100 80GB x3
+
+
+ + + + \ No newline at end of file