Comments (7)
您好,可以使用自己的数据集在retrain阶段进行微调。也可以在BLIP本来的数据集上search和retrain完,再拿自己的数据集微调。
如果是在BLIP模型上剪枝,使用代码和脚本里提供的对于BLIP剪枝的默认参数即可。
如果时间允许,可以多跑一些retrain的epoch,效果应该会好些。
from upop.
非常感谢,另外如果采用单张4090进行压缩,和log中的时间记录相差会有多大
from upop.
单卡与单卡比较速度应该是相近的,但是log中是用多卡训练的。
只用单卡4090的话,相比log可能需要5倍左右或者再多一点的时间。
from upop.
您好,谢谢您的解答,对我帮助很大。
完整search后再在retrain中微调的方法对时间要求太大,我能否通过如下代码来加载您剪枝后的checkpoint
model = blip_vqa(client=client, pretrained='', image_size=config['image_size'],
vit=config['vit'], vit_grad_ckpt=config['vit_grad_ckpt'], vit_ckpt_layer=config['vit_ckpt_layer'],
evaluate=True)
model.prune_if_compressed(client, config['pretrained'])
并通过如下代码(其中train_loader是我自己的数据集)达到微调的目的
for epoch in range(0, config['max_epoch']):
if args.distributed:
train_loader.sampler.set_epoch(epoch)
cosine_lr_schedule(optimizer, epoch, config['max_epoch'], config['init_lr'], config['min_lr'])
train_stats = train(model, train_loader, optimizer, epoch, device, config, scaler=scaler)
from upop.
可以的,直接load剪枝后的checkpoint就不用search了
from upop.
请问amp参数代表什么意义呢?
parser.add_argument('--amp', action='store_true')
from upop.
amp=automatic mixed precision 自动混合精度 readme里有写
from upop.
Related Issues (13)
- Cannot find package petrel-oss-sdk while installing dependencies
- No such file or directory: 'java': 'java' while evaluating or compressing models on the Image Caption task
- Runtime error caused by clip/mock.py or deit/mock.py while evaluating or compressing
- Question about accumulated gradients metric HOT 3
- Problem installing petrel-oss-sdk v2.2.1-2-g1505ef3-master from environment.yaml pip dependencies HOT 1
- Availability of Pretrained Weights for Chinese Users HOT 2
- Problem with CLIP implementation HOT 1
- 请问能否支持blip2模型? HOT 1
- 显存被占满 HOT 1
- 加載checkpoints HOT 9
- 你好 我在渐进式剪枝这一环节有些疑问 希望您解答 HOT 2
- 关于数据集的问题 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from upop.