- NLP Engineer, contributing on Korean NLP with Open Source!
monologg / hanbert-transformers Goto Github PK
View Code? Open in Web Editor NEWHanBert on π€ Huggingface Transformers π€
HanBert on π€ Huggingface Transformers π€
μλ νμΈμ. 곡κ°ν΄μ£Όμ μ½λ μ λ§ μ μ©νκ² μ μ°κ³ μμ΅λλ€. κ°μ¬ν©λλ€!
λ€λ¦ μλλΌ transformers 4.0.0 μμ μ 곡ν΄μ£Όμ toy exampleμ κ·Έλλ‘ μ¬μ©ν μ μμ΄μ μ΄λ κ² κΈμ λ¨κΉλλ€.
μλμ κ°μ μλ¬κ° λ°μν©λλ€.
(Ubuntuμμ μ€νλμκ³ , λλ ν 리 μ
ν
λ λμΌνκ² νμ΅λλ€.)
from tokenization_hanbert import HanBertTokenizer
tokenizer = HanBertTokenizer.from_pretrained('HanBert-54kN-torch')
text = "λλ κ±Έμ΄κ°κ³ μλ μ€μ
λλ€. λλκ±Έμ΄ κ°κ³ μλ μ€μ
λλ€. μ λΆλ₯λκΈ°λ νλ€. μ λ¨ΉκΈ°λ νλ€."
tokenizer.tokenize(text)
...
AttributeError: 'HanBertTokenizer' object has no attribute 'vocab'
model outputμ κ΄λ ¨ν toy exampleλ output typeμ΄ λ°λμ΄ μ½κ°μ μμ μ΄ νμνμ§λ§ errorλ λ°μνμ§ μμ΅λλ€.
μ°Έκ³ λ‘ transformers 2.2.2 μμλ λ¬Έμ μμ΄ μ€ν κ°λ₯ν©λλ€.
transformers versionμ λν μꡬμ¬νμ΄ μΆκ°λμ΄μΌν κ² κ°μ μ΄λ κ² κΈμ λ¨κΉλλ€!
μλ νμΈμ
λ¨Όμ 곡κ°ν΄μ£Όμ μ½λ λ무 κ°μ¬ν μ μ¬μ©νκ³ μμ΅λλ€.
λ€λ¦μ΄ μλλΌ HanBert-54kN-torch λ₯Ό pathλ‘ νμ¬ test νμΌμ μ€ν μν€λ©΄
'HanBertTokenizer' object has no attribute 'vocab' κ³Ό κ°μ attribute μλ¬κ° λμ΅λλ€.
tokenization_hanbert.py νμΌμ 435 line μμ μλ¬κ° λ°μνλλ° μ΄λ»κ² ν΄κ²°ν μ μμκΉμ..?
κ°μ¬ν©λλ€!
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.