Skip to content

보캡에 대해서 #27

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

Closed
SangMyeongWoh opened this issue Oct 29, 2020 · 2 comments
Closed

보캡에 대해서 #27

SangMyeongWoh opened this issue Oct 29, 2020 · 2 comments
Labels
question Further information is requested

Comments

@SangMyeongWoh
Copy link

SangMyeongWoh commented Oct 29, 2020

주어진 토큰 이외에 추가적으로 special token을 넣어 사용하고싶은데
이럴때 보켑에서 설정을 어떻게하면되나요?

@haven-jeon
Copy link
Contributor

haven-jeon commented Oct 29, 2020

말씀하신 내용을 처리하는 방법은 아래와 같이 두가지 입니다.

  1. vocab에 물리적으로 토큰을 추가하는 것
  2. 기 정의된 토큰을 활용하는것

1은 SKTBrain/KoBERT#11 를 참고하시면 됩니다만, 번거로워서 추천드리지 않습니다.
2번은 저도 자주 사용하는 방법인데, https://github.com/haven-jeon/KoGPT2-chatbot/blob/9faa8aae64498bd06807914b4c67eb30c14c7465/train_torch.py#L47 코드를 참고하시면 될듯 합니다. 보캡을 보시면 아시겠지만, <unusedX> 토큰이 약 100개 정도 정의가 이미 vocab에 들어있어 이들 토큰을 활용하시면 될거 같습니다.

1번의 장점은 직접 토큰을 정의가능하다는 것인데, 그 이외 장점은 별로 없구요. 2번이 학습된 네트워크 구조 수정이 없이 적용하기 가장 쉬운 방식입니다.

@haven-jeon haven-jeon added the question Further information is requested label Nov 2, 2020
@haven-jeon
Copy link
Contributor

별다른 반응이 없어 이 이슈는 클로즈 합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants