MCPcopy Index your code
hub / github.com/bojone/BERT-whitening

github.com/bojone/BERT-whitening @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
30 symbols 111 edges 6 files 29 documented · 97% updated 5y ago★ 4866 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

BERT-whitening

通过简单的向量白化来改善句向量质量,可以媲美甚至超过BERT-flow的效果。

介绍

使用

  • eng: BERT-whitening在常见英文数据集上的测试;
  • chn: BERT-whitening在常见中文数据集上的测试;
  • demo.py: 早期的简单Demo。

测试环境:tensorflow 1.14 + keras 2.3.1 + bert4keras 0.10.5,如果在其他环境组合下报错,请根据错误信息自行调整代码。

下载

文件合集:链接: https://pan.baidu.com/s/1qv7HuYN3bNvEzPrlnlJqEQ 提取码: vbc3

引用

@article{su2021whitening,
  title={Whitening Sentence Representations for Better Semantics and Faster Retrieval},
  author={Su, Jianlin and Cao, Jiarun and Liu, Weijie and Ou, Yangyiwen},
  journal={arXiv preprint arXiv:2103.15316},
  year={2021}
}

其他

PyTorch版:https://github.com/autoliuweijie/BERT-whitening-pytorch

交流

QQ交流群:808623966,微信群请加机器人微信号spaces_ac_cn

Core symbols most depended-on inside this repo

load_snli_data
called by 6
eng/utils.py
get_encoder
called by 3
chn/utils.py
load_sick_r_data
called by 3
eng/utils.py
transform_and_normalize
called by 2
demo.py
get_tokenizer
called by 2
chn/utils.py
transform_and_normalize
called by 2
chn/utils.py
load_sts_b_train_data
called by 2
eng/utils.py
load_mnli_train_data
called by 2
eng/utils.py

Shape

Function 28
Class 1
Method 1

Languages

Python100%

Modules by API surface

eng/utils.py13 symbols
demo.py8 symbols
chn/utils.py8 symbols
eng/nli_train.py1 symbols

For agents

$ claude mcp add BERT-whitening \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact