GithubHelp home page GithubHelp logo

note's Introduction

.

note's People

Contributors

lottopotato avatar

Watchers

James Cloos avatar  avatar

note's Issues

토치 모델 파라미터, BPE 토크나이저(바이트레벨) 디코드, transformers verbose 옵션

토치 모델 파라미터 개수

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()

RAG 관련

Post processing

  • Moderation - RAI: checking as harmful or unfavorable, ...
  • Regas: grounding check for output answer by question, contexts, groundtruth, ...

pytorch transfomer 마스크 까먹을때

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 와 비슷한 개념

... 더있음

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.