Downloads · 30 days
9
20% of all-time downloads
hj08/Gemma2-9b-reverse-dictionary
Gemma2-9b-reverse-dictionary is a text generation model from hj08. Use it when you need the model to write or continue text. The card lists the license as mit.
Reverse Dictionary This dictionary is not a dictionary that tells you the meaning when you enter a word, but a dictionary that tells you the words corresponding to the meaning when you enter sentence.
Downloads · 30 days
9
20% of all-time downloads
All-time downloads
46
Public
Repo size
37 GB
Likes
1
Public
Click a slice to open those files.
.bin18.5 GB · 100%
From the Hugging Face model README
Reverse Dictionary
This dictionary is not a dictionary that tells you the meaning when you enter a word, but a dictionary that tells you the words corresponding to the meaning when you enter sentence.
I used 우리말샘 dataset, which consists of a lot of information such as word, word meanings, word types, synonymsm, and example sentences. Then, only the words and their meaning were separated to fit the model input structure.
Because I worked in a colab environments, I used Unsloth, a finetuning optimization tool that is useful for small GPU resources.
I used gemma-2-9b-bnb-4bit model among the models supported by Unsloth. This model was 4bit quantized and trained by modifying the parameters. But during the learning process, evaluation couldn't be performed due to 'out of memory', and the entire dataset was trained.
You can find detailed code on github below.
An example inference is as follows:

First of all, we tested simple 10 words:
비행기 - 동력으로 프로펠러를 돌리거나 연소 가스를 내뿜는 힘에 의하여 생기는 양력(揚力)을 이용하여 공중으로 떠서 날아다니는 항공기
가방 - 물건을 넣어 들거나 메고 다닐 수 있게 만든 용구
고양이 - 고양잇과의 하나. 원래 아프리카의 리비아살쾡이를 길들인 것으로, 턱과 송곳니가 특히 발달해서 육식을 주로 한다. 발톱은 자유롭게 감추거나 드러낼 수 있으며, 눈은 어두운 곳에서도 잘 볼 수 있다. 애완동물로도 육종하여 여러 품종이 있다.
영화 - 일정한 의미를 갖고 움직이는 대상을 촬영하여 영사기로 영사막에 재현하는 종합 예술.
자동차 - 원동기를 장치하여 그 동력으로 바퀴를 굴려서 철길이나 가설된 선에 의하지 아니하고 땅 위를 움직이도록 만든 차. 승용차, 승합자동차, 화물 자동차, 특수 자동차 및 이륜자동차가 있다.
바나나 - 파초과의 상록 여러해살이풀. 높이는 3~10미터이며, 땅속의 알줄기에서 죽순 모양의 싹이 나와 긴 타원형의 녹색 잎이 8~10개가 뭉쳐나고, 긴 잎깍지가 서로 겹쳐 헛줄기를 이루면서 자란다. 초여름에 커다란 꽃줄기가 나와 엷은 누런색의 잔꽃이 이삭 모양으로 피고, 열매는 식용한다. 열대 지방이 원산지로 우리나라에서는 온실에서 재배한다.
컴퓨터 - 전자 회로를 이용한 고속의 자동 계산기. 숫자 계산, 자동 제어, 데이터 처리, 사무 관리, 언어나 영상 정보 처리 따위에 광범위하게 이용된다.
사과 - 사과나무의 열매.
책 - 종이를 여러 장 묶어 맨 물건.
학교 - 일정한 목적ㆍ교과 과정ㆍ설비ㆍ제도 및 법규에 의하여 계속적으로 학생에게 교육을 실시하는 기관.
The result is that 7 out of 10 words were guessed correctly, and 2 words were output as similar words.
And 10% of the dataset was used as a testset.
https://github.com/teddylee777/langchain-kr/tree/main/18-FineTuning
If you want to see more,