Skip to content

Commit be3cd9e

Browse files
📝 更新模型社区文档,优化内容与结构
- 修改了模型代号表格,增加了更多公司及其模型的对比信息,提升了信息的全面性。 - 精简了关于大模型社区的描述,强调了Hugging Face和魔搭社区的功能与特点,增强了内容的清晰度。 - 更新了模型排名网站链接,确保信息的准确性与时效性。
1 parent f0f18bf commit be3cd9e

File tree

2 files changed

+27
-55
lines changed

2 files changed

+27
-55
lines changed

docs/docs/大模型的应用/模型社区与部署.mdx

Lines changed: 26 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,15 @@ title: 模型社区与部署
2727

2828
以通义千问(Qwen)为例,其经历了从 Qwen → Qwen-2 → Qwen-2.5 → Qwen3 的持续迭代。每一代升级都伴随着架构优化、训练数据扩充、上下文长度提升或推理效率增强,体现了技术的快速演进。
2929

30-
不同的架构显然是不同的开源模型,大模型抄袭与套皮往往指的就是架构一致。
31-
32-
下面的表格列出了部分公司及其主要大模型代号:
30+
不同的架构显然是不同的开源模型,大模型抄袭与套皮往往指的就是架构一致。下面的表格列出了头部公司及其主要模型代号:
3331

3432
| **国内** | **国外** |
3533
| :---- | :---- |
36-
| 阿里巴巴: 通义千问 (Qwen) | Anthropic: Claude |
37-
| 深度求索: DeepSeek | OpenAI: GPT |
38-
| 月之暗面: KIMI | 谷歌: Gemini |
34+
| 阿里巴巴: 通义千问 (Qwen)/通义万象(Wan) | 谷歌: Gemini/Veo |
35+
| 字节跳动: 豆包 (coze)/即梦(Seedream) | OpenAI: GPT/Sora |
36+
| 深度求索: DeepSeek | Anthropic: Claude |
3937
| 智谱: 智谱清言 (GLM) | xAI: Grok |
40-
| 字节跳动: 豆包 (coze) | 微软: Phi |
41-
| 百度: 文心大模型 (Ernie) | Meta: Llama |
42-
| 腾讯: 混元 (Hunyuan) | Mistral AI: Mistral |
38+
| 腾讯: 混元 (Hunyuan) | Meta: Llama |
4339

4440
### 参数权重
4541

@@ -141,61 +137,38 @@ graph LR
141137
class L1,L2,L3 quant
142138
```
143139

144-
## 大模型社区
145-
146-
大模型社区是指围绕大型深度学习模型构建的开放协作平台和生态系统,除了开源模型还提供:数据集、教程、体验等功能。这些社区由研究人员、开发者、数据科学家、工程师及爱好者组成,他们共同致力于大模型的研究、开发、优化和应用。
147-
148-
社区具有明显的马太效应,即头部效应明显,头部模型拥有最多的资源,最新的技术,最多的用户。这里列举两个在国内外有一定影响力的社区。
149-
150-
### Hugging Face
151-
152-
社区地址:[https://huggingface.co/](https://huggingface.co/)
153-
154-
以 Qwen 模型为例,下面展示如何使用 Hugging Face 的 transformers 库进行推理。其中`model_name`为模型地址。
155-
156-
```python showLineNumbers
157-
from transformers import AutoModelForCausalLM, AutoTokenizer
158-
159-
model_size = "3B" # 3B 7B 14B 32B
160-
model_name = f"Qwen/Qwen2.5-{model_size}-Instruct"
161-
162-
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")
163-
tokenizer = AutoTokenizer.from_pretrained(model_name)
140+
这四类演化中,架构是最重要的,目前可以分为三代(代表模型不是最早模型,而是知名度最高的模型):
164141

165-
while True:
166-
prompt = input("输入你的问题: ")
167-
if prompt == "退出":
168-
break
142+
| 代际 | 时间段 | 特征 | 代表模型 |
143+
| :---- | :---- | :---- | :---- |
144+
| 第一代 | 2020–2022 | 传统大模型应用 | GPT-3.5 |
145+
| 第二代 | 2023–2024 | 原生多模态应用 | GPT-4o |
146+
| 第三代 | 2025– | 高效架构(MoE)+ 智能体(Agent)范式 | Claude-4.5 |
169147

170-
messages = [
171-
{
172-
"role": "system",
173-
"content": "你是一个AI助手,由阿里巴巴云创建。你是一个乐于助人的助手。你总是以中文回答问题。",
174-
},
175-
{"role": "user", "content": prompt},
176-
]
177-
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
178-
model_input = tokenizer([text], return_tensors="pt").to(model.device)
148+
:::info
149+
Qwen 3-MAX 使用的也是MoE架构。官方称其参数超过1T(1000B)远超最大开源模型 Llama 3.1(405B )是国内最顶级的第三代模型之一。
150+
:::
179151

180-
generated_ids = model.generate(**model_input, max_new_tokens=512)
181-
generated_ids = [output[len(input_ids):] for input_ids, output in zip(model_input.input_ids, generated_ids)]
152+
## 大模型社区
182153

183-
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
184-
print(response)
185-
```
154+
大模型社区是指围绕大型深度学习模型构建的开放协作平台和生态系统,除了开源模型还提供:数据集、教程、体验等功能。这些社区由研究人员、开发者、数据科学家、工程师及爱好者组成,他们共同致力于大模型的研究、开发、优化和应用。
186155

187-
### 魔搭社区
156+
社区具有明显的马太效应,即头部效应明显,头部模型拥有最多的资源,最新的技术,最多的用户。
188157

189-
魔搭社区是阿里达摩院推出的开源社区,基于中国网络环境,可以更方便地下载模型,地址:[https://www.modelscope.cn/](https://www.modelscope.cn/)
158+
Hugging Face 是国外最著名的开源社区,提供了 `transformers` 库,可以方便地下载模型,地址:[https://huggingface.co/](https://huggingface.co/)
190159

191-
魔搭社区提供了 `modelscope` 库,对标 Hugging Face 的 `transformers` 库。
160+
魔搭社区是阿里达摩院推出的开源社区,基于中国网络环境,`modelscope` 库,对标 Hugging Face 的 `transformers` 库。地址:[https://www.modelscope.cn/](https://www.modelscope.cn/)
192161

193-
代码除了开头的导包部分,剩下的与 Hugging Face 一致
162+
以 Qwen 模型为例,下面展示如何使用 `transformers``modelscope` 库进行推理。其中`model_name`为模型地址
194163

195164
```python showLineNumbers
196-
from modelscope import AutoModelForCausalLM, AutoTokenizer
165+
types = "huggingface" # 模型社区选择:"huggingface" 或 "modelscope"
166+
if types == "huggingface":
167+
from transformers import AutoModelForCausalLM, AutoTokenizer
168+
elif types == "modelscope":
169+
from modelscope import AutoModelForCausalLM, AutoTokenizer
197170

198-
model_size = "0.5B" # 3B 7B 14B 32B
171+
model_size = "3B" # 3B 7B 14B 32B
199172
model_name = f"Qwen/Qwen2.5-{model_size}-Instruct"
200173

201174
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")

docs/docs/大模型的应用/模型评测.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ sidebar_position: 9
66
为了更好的了解当下模型性能,我们列举了几个模型排名网站,这些网站通过主观测试(人工盲选较优模型)或者客观测试(自动通过含有答案的测试对比准确度),对模型进行排名,并给出排名结果。
77

88
- Hugging Face 模型排名:[https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
9-
- 司南排名:[https://opencompass.org.cn/arena](https://opencompass.org.cn/arena)
10-
- 天秤排名:[https://arena.flageval.net/index.html#/arena-page?l=zh-CN](https://arena.flageval.net/index.html#/arena-page?l=zh-CN)
9+
- lmarena排名:[https://lmarena.ai/](https://lmarena.ai/)
1110

1211
那么如何自动化测评得出排名?
1312

0 commit comments

Comments
 (0)