-
Notifications
You must be signed in to change notification settings - Fork 4.4k
refactor quant table #3911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
refactor quant table #3911
Conversation
|
改动大,新建工具,而不是在老工具上堆特性 格式看起来就是个 ini,读写 ini 直接写一个就行,没必要搞第三方toml代码 |
嗯,所以先发 PR 看看让不让用 toml 。 都是 part1 了,所以 add/zeropoint 这些不支持的, part2 才会发啊。 Layernorm 系数是 per-channel 的,偶尔有的系数不一样。transformer 里 layernorm inp 离心值需要保留才能不损失精度。 |
…nto ncnn-int8-toml
|
这个 PR 我没有要改的了,坐等 CI 。 |
背景
refactor 量化表结构成 .ini 格式,上个版本的量化表没法再加新的 opr
修改前:https://github.com/tpoisonooo/cpp-syntactic-sugar/blob/master/ini-config/ncnn.txt
修改后:https://github.com/tpoisonooo/cpp-syntactic-sugar/blob/master/ini-config/ncnn.ini
修改内容
ncnn2table命令新增选项: format=inincnn2int8增加对 .ini 解析测试方法
测试了 sqznet 分别用 .ini/.txt 跑
ncnn2table和ncnn2int8,对比最终 .bin 和 .param 文件的 md5 值相同。