Mindket

DistilBERT base uncased

新上架第 1 版 · 更新于

概览

从 BERT base 蒸馏出来的小而快的英文语言模型,有 67M 参数。能填补被遮住的词,主要用来针对分类、标注和问答进行微调。

DistilBERT base uncased 是一款工具包,属于开发类,由 Mindket 上架。可免费获取。当前为第 1 版,最近更新于 。在本页下载,是一个装着它全部文件的 zip 压缩包。这些文件不会自己运行。

速览

你需要
  • Python
  • transformers 包,以及 PyTorch 或 TensorFlow
  • 大约 268 MB 的磁盘空间,用于 F32 权重
用在
  • Python,通过 Transformers 库
  • PyTorch 或 TensorFlow,因为模型卡两种都展示了
  • Windows、macOS 或 Linux,CPU 或 GPU 均可
  • 针对需要读完整个句子的任务的微调工作
先运行
pip install -U huggingface_hub
hf download distilbert/distilbert-base-uncased

平台

Windows操作系统
macOS操作系统
Linux操作系统

关于

它是什么

DistilBERT base uncased 是一个紧凑的英文语言模型,由 BERT base 模型蒸馏而来。它有 67M 参数,F32 权重约 268 MB。它不区分大小写,所以把 English 和 english 当作同一个词。它学到了与老师模型相同的英语内部表示,同时运行得更快。它主要用来针对你自己的任务进行微调。

适合谁

如果你是开发者或学生,需要一个小而快的文本模型,用来针对分类、标注或问答进行微调,它很适合你。

IndustryWho uses itHow they use itExample
客户支持NLP 开发者微调后给消息打标签微调之后,一张工单被归到某个主题
搜索与问答搜索工程师针对问答进行微调模型卡把问答列为预期任务之一
教育机器学习的学生和老师学习掩码语言模型如何工作填空演示会猜出缺失的词

如果你需要文本生成,可以跳过它,因为模型卡为此推荐 GPT2 之类的模型。

用在哪里

  • Python,通过 Transformers 库
  • PyTorch 或 TensorFlow,因为模型卡两种都展示了
  • Windows、macOS 或 Linux,CPU 或 GPU 均可
  • 针对需要读完整个句子的任务的微调工作
Use caseWhoWhat they get back
填补被遮住的词初学者对隐藏词的排序猜测
句子或词元分类开发者一个可以微调的小型基础模型
问答搜索团队用于该任务的快速基础模型

如何设置

你需要 Python,以及带 PyTorch 或 TensorFlow 的 Transformers 库。

  • Python
  • transformers 包,以及 PyTorch 或 TensorFlow
  • 大约 268 MB 的磁盘空间,用于 F32 权重
  1. 安装 transformers 包和一个深度学习库。
  2. 可选:先用下面的第二条命令,通过 Hugging Face 工具下载模型文件。
  3. 在代码里按名称加载模型。
  4. 运行一个带遮罩的句子,或者对文本编码来获取特征。
pip install -U huggingface_hub
hf download distilbert/distilbert-base-uncased

如何使用

最快的尝试是 fill-mask 流水线。在缺词的位置放上 [MASK],模型就会对猜测排序。

from transformers import pipeline
unmasker = pipeline('fill-mask', model='distilbert-base-uncased')
unmasker("Hello I'm a [MASK] model.")

在 PyTorch 里获取文本的特征:

from transformers import DistilBertTokenizer, DistilBertModel
tokenizer = DistilBertTokenizer.from_pretrained('distilbert-base-uncased')
model = DistilBertModel.from_pretrained("distilbert-base-uncased")
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors='pt')
output = model(**encoded_input)
ToolWhat it does
pipeline一次调用就运行填空
DistilBertTokenizer把文本变成模型能读的词元
DistilBertModel在 PyTorch 里返回文本的特征
TFDistilBertModel在 TensorFlow 里返回文本的特征

示例

你写下 Hello I'm a [MASK] model 这个句子并运行流水线。模型卡显示最靠前的猜测是 role、fashion、business、model 和 modeling,每个都带有一个分数。

新手与专家

把它想成一个模仿大老师 BERT 的小学生,保留了老师大部分的语言感觉。第一个小尝试是上面的填空流水线。

训练结合了三个目标。它要匹配老师的概率,要预测被遮住的词(输入词中有 15% 被隐藏),还要匹配老师的隐藏状态。因为它在两个方向上读完整个句子,所以适合判断整句的任务,而不是文本生成。

  1. 遮住句子里的一些词
  2. 学生预测被遮住的词
  3. 它被推动去匹配老师 BERT
  4. 你用自己的标签微调它
  5. 把它用在你的任务上

注意事项

模型卡列出了这些数字。

DistilBERT base uncased 一览
PropertyValue
参数67M
F32 权重约 268 MB
4-bit 权重,估算约 33 MB
训练中被遮住的词的比例15%
  • Bias: 模型卡警告说预测可能有偏见,并且从老师模型继承了一些偏见
  • Language: 英文
  • Other versions: 其他人已经发布了 108 个量化版本和 12,853 个微调版本
  • License: Apache 2.0
  • Cost to run: 没有提到
  • Data it reaches: 你下载的文件和你在本地处理的文本
  • Not for: 文本生成,或者任何有偏见的猜测会造成伤害的任务

README 和文件

README

DistilBERT base uncased

从 BERT base 蒸馏出来的小而快的英文语言模型,有 67M 参数。能填补被遮住的词,主要用来针对分类、标注和问答进行微调。

由 distilbert 在 Hugging Face 上制作。这些说明是 Mindket 根据它的模型页面和模型卡写的,模型自己的文件和许可证在 Hugging Face 上。

简介

它是什么:DistilBERT base uncased 是一个紧凑的英文语言模型,由 BERT base 模型蒸馏而来。它有 67M 参数,F32 权重约 268 MB。它不区分大小写,所以把 English 和 english 当作同一个词。它学到了与老师模型相同的英语内部表示,同时运行得更快。它主要用来针对你自己的任务进行微调。

适合谁:如果你是开发者或学生,需要一个小而快的文本模型,用来针对分类、标注或问答进行微调,它很适合你。

Industry | Who uses it | How they use it | Example
客户支持 | NLP 开发者 | 微调后给消息打标签 | 微调之后,一张工单被归到某个主题
搜索与问答 | 搜索工程师 | 针对问答进行微调 | 模型卡把问答列为预期任务之一
教育 | 机器学习的学生和老师 | 学习掩码语言模型如何工作 | 填空演示会猜出缺失的词

如果你需要文本生成,可以跳过它,因为模型卡为此推荐 GPT2 之类的模型。

用在哪里:

  • Python,通过 Transformers 库
  • PyTorch 或 TensorFlow,因为模型卡两种都展示了
  • Windows、macOS 或 Linux,CPU 或 GPU 均可
  • 针对需要读完整个句子的任务的微调工作
Use case | Who | What they get back
填补被遮住的词 | 初学者 | 对隐藏词的排序猜测
句子或词元分类 | 开发者 | 一个可以微调的小型基础模型
问答 | 搜索团队 | 用于该任务的快速基础模型

如何设置:你需要 Python,以及带 PyTorch 或 TensorFlow 的 Transformers 库。

  • Python
  • transformers 包,以及 PyTorch 或 TensorFlow
  • 大约 268 MB 的磁盘空间,用于 F32 权重
  1. 安装 transformers 包和一个深度学习库。
  2. 可选:先用下面的第二条命令,通过 Hugging Face 工具下载模型文件。
  3. 在代码里按名称加载模型。
  4. 运行一个带遮罩的句子,或者对文本编码来获取特征。
pip install -U huggingface_hub
hf download distilbert/distilbert-base-uncased

如何使用:最快的尝试是 fill-mask 流水线。在缺词的位置放上 [MASK],模型就会对猜测排序。

from transformers import pipeline
unmasker = pipeline('fill-mask', model='distilbert-base-uncased')
unmasker("Hello I'm a [MASK] model.")

在 PyTorch 里获取文本的特征:

from transformers import DistilBertTokenizer, DistilBertModel
tokenizer = DistilBertTokenizer.from_pretrained('distilbert-base-uncased')
model = DistilBertModel.from_pretrained("distilbert-base-uncased")
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors='pt')
output = model(**encoded_input)
Tool | What it does
pipeline | 一次调用就运行填空
DistilBertTokenizer | 把文本变成模型能读的词元
DistilBertModel | 在 PyTorch 里返回文本的特征
TFDistilBertModel | 在 TensorFlow 里返回文本的特征

示例:你写下 Hello I'm a [MASK] model 这个句子并运行流水线。模型卡显示最靠前的猜测是 role、fashion、business、model 和 modeling,每个都带有一个分数。

新手与专家:把它想成一个模仿大老师 BERT 的小学生,保留了老师大部分的语言感觉。第一个小尝试是上面的填空流水线。

训练结合了三个目标。它要匹配老师的概率,要预测被遮住的词(输入词中有 15% 被隐藏),还要匹配老师的隐藏状态。因为它在两个方向上读完整个句子,所以适合判断整句的任务,而不是文本生成。

遮住句子里的一些词
学生预测被遮住的词
它被推动去匹配老师 BERT
你用自己的标签微调它
把它用在你的任务上

注意事项:模型卡列出了这些数字。

Title: DistilBERT base uncased 一览
Property | Value
参数 | 67M
F32 权重 | 约 268 MB
4-bit 权重,估算 | 约 33 MB
训练中被遮住的词的比例 | 15%
  • Bias: 模型卡警告说预测可能有偏见,并且从老师模型继承了一些偏见
  • Language: 英文
  • Other versions: 其他人已经发布了 108 个量化版本和 12,853 个微调版本
  • License: Apache 2.0
  • Cost to run: 没有提到
  • Data it reaches: 你下载的文件和你在本地处理的文本
  • Not for: 文本生成,或者任何有偏见的猜测会造成伤害的任务

Hugging Face 上的数据(2026年11月13日)

  • 任务:fill mask
  • 框架:transformers
  • 参数量:67M
  • Weights: about 268 MB in F32; about 33 MB at 4-bit (estimate)
  • Formats: Safetensors
  • 最近 30 天下载:5,452,853
  • 点赞:1,148
  • 许可证:apache-2.0
  • 语言:en
  • Quantized versions: 108
  • Fine-tunes: 12,864
  • 标签:transformers, pytorch, rust, safetensors, distilbert, fill-mask, exbert

链接

  • 模型:https://huggingface.co/distilbert/distilbert-base-uncased
  • 文件:https://huggingface.co/distilbert/distilbert-base-uncased/tree/main

获取模型

用 Hugging Face 的命令行下载它的文件:

pip install -U huggingface_hub
hf download distilbert/distilbert-base-uncased

然后按它的模型卡使用它。这个工具包里没有会自己运行的东西。

文件
README.md  6 KB

1 个文件,共 6 KB,以 zip 压缩包下载。

更新内容

  • 第 1 版 · 2026-11-13

同类产品对比

同一分类里与本产品共有标签最多的已上架 Hugging Face 模型。

产品最近 30 天下载点赞参数量许可证最近更新
DistilBERT base uncased 本页5,452,8531,14867Mapache-2.0
BERT base model (uncased)共有 exbert · rust · fill-mask31,346,5283,071110Mapache-2.0
GPT-2共有 exbert · rust · pytorch32,892,2233,932137Mmit
all-MiniLM-L6-v2共有 rust · pytorch · transformers174,740,1846,10422.7Mapache-2.0
T5 Small共有 rust · pytorch · transformers20,046,14169660.5Mapache-2.0
T5 Base共有 rust · pytorch · transformers2,853,651811223Mapache-2.0
数据为 Mindket 在 2026-11-12 至 2026-11-13 期间读取的数值。

评价

还没有评分

写评价

还没有评价。

大家怎么说

Hacker News、Bluesky、X、Reddit、Facebook 和 YouTube 上提到这个项目的帖子和评论,来自每周一次的搜索和 Trendshift。它们不是 Mindket 写的,也未经核实,点开即可在原帖处阅读。

hessdalenlightShow HN: Chonky – a neural approach for text semantic chunkingTLDR: I’ve made a transformer model and a wrapper library that segments text into meaningful semantic chunks. The current text splitting approaches rely on heuristics (although one can use neural embedder to group semantically related sentences). I propose a fully neural approach to semantic…169 分 · 35 条回复Sergii Yarochevskyi 🇺🇦model: "Xenova/toxic-bert", options: { dtype: "q8" }, }, sentiment: { task: "text-classification", model: "Xenova/distilbert-base-uncased-finetuned-sst-2-english", options: { dtype: "q8" }, }, }, }, })1 条回复seizethecheese65% of Hacker News posts have negative sentiment, and they outperformThis is currently the top reply to the top comment. It’s classified at 89% negative by this model: https://huggingface.co/distilbert/distilbert-base-uncased-fi... Ironically, the above comment scored 99.9% negativity.seizethecheese65% of Hacker News posts have negative sentiment, and they outperformIs it “negative” though? I ran it through this model and it gave 99.9% positive. (You tell me if this model is substantively different from what you used.) https://huggingface.co/distilbert/distilbert-base-uncased-fi...seizethecheese65% of Hacker News posts have negative sentiment, and they outperformI’m not sure if this is the exact model used by OP, but it appears close, and it classifies your comment as positive at 99.9%. https://huggingface.co/distilbert/distilbert-base-uncased-fi...7777777phil65% of Hacker News posts have negative sentiment, and they outperformFair point, `ai_sentiment` should have been defined explicitly. It's the production score from DistilBERT-base-uncased-finetuned-sst-2-english, the same model family as Cloudflare's sentiment classifier. That explains the r=0.98 correlation you noticed. And you're right that the models disagree.…

搜索日期

Mindket 的更多商品

查看 Mindket 的全部商品

Bonsai-27B-GGUF

lmstudio-community · 工具包

面向 LM Studio 的 27B Bonsai 模型 GGUF 转换版,含 3.80 GB 的 Q1_0 语言文件和 0.93 GB 的 BF16 视觉投影器。已测试文本、视觉和并行工具调用。

新上架

以每权重 2.9 位的 EXL3 量化运行 DeepSeek-V4.1-Flash-1017,这是一份 196 GiB 的副本,适合在自己硬件上部署大模型的人。困惑度与原模型相差不大。

新上架

MusicGen Small

facebook · 工具包

根据文字描述或音频提示生成短音乐片段,是 facebook MusicGen 的 small 检查点。适合想在自己电脑上试用文字生成音乐的开发者和音乐爱好者。

新上架

开发类的相似商品

查看开发类的全部商品

Lexnet

alpindale · 工具包

用一个只有约 984 个权重的小型神经网络,为 C 源代码的每个字符打上语法高亮标签,通过一个小小的 C 程序运行。适合对手工设计的网络好奇的开发者和研究者。

新上架

FLUX.2 Klein LoRA Studio

prithivMLmods · 工具包

在浏览器或你自己的电脑上,用一个 Gradio 应用试用 FLUX.2 Klein 图像模型的一组 LoRA。适合制作或测试 AI 图片的人。

新上架

anaksor-ocr

Sokheng · 工具包

这个模型从文档、收据和路牌照片里读取高棉语和英语文字,用一个检测器找文本行,再用识别器读每一行。适合需要在 Python 里做高棉语 OCR 的开发者。

新上架