Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Tongyun1/from-minimind-to-more
/ functions
Functions
5 in github.com/Tongyun1/from-minimind-to-more
⨍
Functions
5
◇
Types & classes
1
↓ 2 callers
Method
_get_stats
内部方法:统计相邻 token 对的出现频率
src/BPE.py:7
↓ 2 callers
Method
_merge
内部方法:在 tokens 列表中,将指定的 pair 替换为 new_token
src/BPE.py:15
↓ 2 callers
Method
tokenize
使用学习到的规则对新文本进行分词
src/BPE.py:53
↓ 1 callers
Method
train
训练分词器:从语料中学习合并规则
src/BPE.py:29
Method
__init__
(self)
src/BPE.py:2