docs: 更新多篇技术文档的元数据和格式

- 添加Entity Framework Core文档
- 更新大数据文档的标签和格式
- 完善Claude Code文档的元数据和表格格式
- 为C#和ASP.NET Core文档添加.NET标签
- 修正大模型文档的标签和表格格式
This commit is contained in:
2026-04-15 12:51:17 +08:00
parent 5a9ddf7918
commit 09b91081f2
6 changed files with 114 additions and 103 deletions
+45 -45
View File
@@ -1,7 +1,7 @@
---
title: 大模型
date: 2025-02-18 10:06:57
tags:
tags: AI
---
# Ollama
@@ -379,7 +379,7 @@ pip install -U "huggingface_hub"
hf download cyankiwi/Nemotron-Orchestrator-8B-AWQ-8bit --local-dir /AI/hf/models/cyankiwi/Nemotron-Orchestrator-8B-AWQ-8bit
```
-
-
# Code-forge
@@ -538,7 +538,7 @@ conda activate ai
# Anaconda
>
>
## 安装
@@ -561,7 +561,7 @@ source ~/.zshrc
conda env list
```
2. 查看conda下的包
```she
@@ -602,7 +602,7 @@ source ~/.zshrc
conda remove --name env_name package_name
```
## 问题
@@ -612,24 +612,24 @@ source ~/.zshrc
```shell
#在个人环境下修改
conda activate gatkenv
conda env config vars set PS1='($CONDA_DEFAULT_ENV)[\u@\h \W]$'
#重启环境就ok了
conda deactivate
conda activate gatkenv
#在所有的虚拟环境下修改,这个命令的意思是在~/.condarc下添加一行
conda config --set env_prompt "({default_env})[\u@\h \W]$"
#取消设置
conda config --remove-key env_prompt
```
2. conda 安装后没有将conda置为默认
@@ -638,23 +638,23 @@ source ~/.zshrc
This will activate conda on startup and change the command prompt when activated.
If you'd prefer that conda's base environment not be activated on startup,
run the following command when conda is activated:
conda config --set auto_activate_base false
You can undo this by running `conda init --reverse $SHELL`? [yes|no]
[no] >>>
You have chosen to not have conda modify your shell scripts at all.
To activate conda's base environment in your current shell session:
eval "$(/home/user/miniconda3/bin/conda shell.YOUR_SHELL_NAME hook)"
To install conda's shell functions for easier access, first activate, then:
conda init
Thank you for installing Miniconda3!
```
则执行以下shell
@@ -688,7 +688,7 @@ source ~/.zshrc
下载试试:如果两都能看到下载源,那么就更改成功。
```mipsasm
conda install
conda install
```
##### Linux系统下:
@@ -705,22 +705,22 @@ source ~/.zshrc
```ini
[global]
index-url=https://pypi.tuna.tsinghua.edu.cn/simple
[install]
index-url=https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=pypi.tuna.tsinghua.edu.cn
disable-pip-version-check = true
timeout = 6000
disable-pip-version-check = true
timeout = 6000
```
下载试试:
```bash
pip install
pip install
```
# Jupyter Notebook
>
>
## 全局
@@ -946,7 +946,7 @@ CUDA_VISIBLE_DEVICES=0 vllm serve /mnt/e/modelscope/deepseek-ai/DeepSeek-R1-Dist
### Qwen/Qwen3-4B
```shell
vllm serve ~/modelscope/Qwen/Qwen3-4B --api-key token-abc123 --enable-reasoning --reasoning-parser deepseek_r1 --max_model_len=2048 --gpu_memory_utilization=0.85
vllm serve ~/modelscope/Qwen/Qwen3-4B --api-key token-abc123 --enable-reasoning --reasoning-parser deepseek_r1 --max_model_len=2048 --gpu_memory_utilization=0.85
```
#### supervisor
@@ -1166,7 +1166,7 @@ cd LLaMA-Factory
# 安装所需依赖
pip install -e ".[torch,metrics]"
# 启动webui
python src/webui.py
python src/webui.py
```
## 微调
@@ -1255,24 +1255,24 @@ print(f'Model is quantized and saved at "{quant_path}"')
## **1. 核心原理对比**
| **架构类型** | **核心思想** | **典型模型** |
| -------------- | ------------------------------------------------------------ | -------------------------- |
| **Dense** | 所有参数对所有输入生效,每层神经元全连接,统一处理所有输入特征。 | GPT-3、BERT、LLAMA |
| **架构类型** | **核心思想** | **典型模型** |
| -------------- | ------------------------------------------------------------------------------------ | -------------------------- |
| **Dense** | 所有参数对所有输入生效,每层神经元全连接,统一处理所有输入特征。 | GPT-3、BERT、LLAMA |
| **MoE** | 将模型划分为多个“专家”(子网络),每个输入仅激活部分专家,通过路由机制动态分配任务。 | Switch Transformer、GShard |
| **Hybrid-MoE** | 混合Dense和MoE层:部分层全连接,部分层采用MoE结构,平衡计算效率和模型容量。 | DeepSeek-MoE、Google GLaM |
| **Hybrid-MoE** | 混合Dense和MoE层:部分层全连接,部分层采用MoE结构,平衡计算效率和模型容量。 | DeepSeek-MoE、Google GLaM |
------
## **2. 技术特点与性能对比**
| **维度** | **Dense** | **MoE** | **Hybrid-MoE** |
| -------------- | --------------------------------------------------- | ------------------------------------------------------------ | ----------------------------------------- |
| **维度** | **Dense** | **MoE** | **Hybrid-MoE** |
| -------------- | --------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------- |
| **参数规模** | 总参数量=激活参数量,随层数线性增长。 | 总参数量高(专家数×专家规模),但激活参数量低(仅激活部分专家)。 | 介于两者之间,MoE层数可控。 |
| **计算效率** | 计算成本高(FLOPs与参数量正相关),适合小规模模型。 | 相同参数量下,FLOPs显著降低(仅激活部分专家)。 | 通过调整MoE层比例,灵活平衡计算开销。 |
| **训练稳定性** | 收敛稳定,梯度传播路径简单。 | 路由机制易导致专家负载不均衡,需复杂正则化。 | 稳定性优于纯MoE,但仍需路由优化。 |
| **扩展性** | 参数规模受硬件限制,千亿级后成本陡增。 | 可扩展至万亿参数(如GShard-1.6T),适合超大规模模型。 | 通过局部MoE化实现高效扩展,适配中等规模。 |
| **显存占用** | 高(需存储全部参数梯度)。 | 显存需求更高(专家参数独立存储)。 | 显存介于两者之间,取决于MoE层占比。 |
| **应用场景** | 通用任务、资源受限场景。 | 超大规模预训练、多任务学习。 | 需平衡性能与成本的工业级应用。 |
| **计算效率** | 计算成本高(FLOPs与参数量正相关),适合小规模模型。 | 相同参数量下,FLOPs显著降低(仅激活部分专家)。 | 通过调整MoE层比例,灵活平衡计算开销。 |
| **训练稳定性** | 收敛稳定,梯度传播路径简单。 | 路由机制易导致专家负载不均衡,需复杂正则化。 | 稳定性优于纯MoE,但仍需路由优化。 |
| **扩展性** | 参数规模受硬件限制,千亿级后成本陡增。 | 可扩展至万亿参数(如GShard-1.6T),适合超大规模模型。 | 通过局部MoE化实现高效扩展,适配中等规模。 |
| **显存占用** | 高(需存储全部参数梯度)。 | 显存需求更高(专家参数独立存储)。 | 显存介于两者之间,取决于MoE层占比。 |
| **应用场景** | 通用任务、资源受限场景。 | 超大规模预训练、多任务学习。 | 需平衡性能与成本的工业级应用。 |
------
@@ -1309,11 +1309,11 @@ print(f'Model is quantized and saved at "{quant_path}"')
## **4. 典型应用场景**
| **架构** | **适用场景** |
| -------------- | ------------------------------------------------------------ |
| **架构** | **适用场景** |
| -------------- | ----------------------------------------------------------------------------------- |
| **Dense** | - 中小规模模型(<100B参数) - 对训练稳定性要求高的任务(如对话生成) - 边缘设备推理 |
| **MoE** | - 超大规模预训练(>500B参数) - 多任务/多模态学习 - 云端高性能计算集群 |
| **Hybrid-MoE** | - 中等规模模型(100B-500B参数) - 需兼顾通用性与效率的工业场景 - 长文本处理任务 |
| **MoE** | - 超大规模预训练(>500B参数) - 多任务/多模态学习 - 云端高性能计算集群 |
| **Hybrid-MoE** | - 中等规模模型(100B-500B参数) - 需兼顾通用性与效率的工业场景 - 长文本处理任务 |
------