lottopotato / note Goto Github PK
View Code? Open in Web Editor NEWskill, reference, method.. note
skill, reference, method.. note
토치 모델 파라미터 개수
def count_parameters(model):
n_parameters = sum(p.numel() for p in model.parameters() if p.requires_grad)
print(f'{n_parameters:,}')
BPE 토크나이저(바이트레벨) 디코드
from tokenizers.decoders import ByteLevel
decoder = ByteLevel()
decoder.decode([ 'ĠÑģлово' ])
transformers verbose(huggingface/transformers#14285 (comment))
transformers.logging.set_verbosity_error()
dask/distributed#1704 (comment)
https://stackoverflow.com/a/49305034
https://discourse.jupyter.org/t/jupyter-notebook-zmq-message-arrived-on-closed-channel-error/17869/7
jupyter notebook --NotebookApp.iopub_data_rate_limit=1.0e10
jupyter notebook --NotebookApp.iopub_msg_rate_limit=1.0e10
tornado6.1, jupyter-client==7.3.2
참고.
https://stackoverflow.com/a/45319156
lsmod | grep nvidia
sudo rmmod nvidia_drm
sudo rmmod nvidia_modeset
sudo rmmod nvidia_uvm
sudo rmmod nvidia
Troubleshooting
sudo lsof /dev/nvidia*
torch.cuda.is_available()
torch.cuda.device_count()
torch.cuda.current_device()
https://stackoverflow.com/a/68396781
Difference between src_mask and src_key_padding_mask
src_mask [Tx, Tx] = [S, S] ...
tgt_mask [Ty, Ty] = [T, T] ...
memory_mask [Ty, Tx] = [T, S] ...
src_key_padding_mask [B, Tx] = [N, S] ...
tgt_key_padding_mask [B, Ty] = [N, t] ...
memory_key_padding_mask [B, Tx] = [N, S] ...
대충 정리하면 _mask는 attention layer관련 cheating 방지 right shift or left shift 마스크가 맞고
_padding_mask는 loss, optimize 관련 패딩 -> ignore_pad 와 비슷한 개념
... 더있음
.quantile()
jupyter nbextension enable --py widgetsnbextension
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.