Skip to content

taeminlee/self-instruct-eval-ko

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

self-instruct-eval-ko

Self-Instruct의 eval dataset을 ν•œκ΅­μ–΄ λͺ¨λΈμ—μ„œ μ‚¬μš© κ°€λŠ₯ν•˜λ„λ‘ λ²ˆμ—­ν•œ 데이터 λͺ¨μŒμž…λ‹ˆλ‹€.

Update logs

  • 2023.04.14: λΉ„λ™κΈ°λ‘œ μ²˜λ¦¬ν•˜μ—¬ 쑰금 더 μ‹œκ°„μ„ μ•„λ‚„ 수 μžˆμŠ΅λ‹ˆλ‹€!

datasets

  • user_oriented_instructions_deepl_ko.jsonl : deepl둜 λ²ˆμ—­ν•œ 평가 데이터 μ§‘ν•©
  • user_oriented_instructions_chatgpt_ko.jsonl : GPT-3.5-turbo둜 λ²ˆμ—­ν•œ 평가 데이터 μ§‘ν•©
  • user_oriented_instructions_gpt4_ko.jsonl : GPT-4둜 λ²ˆμ—­ν•œ 평가 데이터 μ§‘ν•©

직접 λ§Œλ“€κΈ°

Requires

  • openai api
  • deepl api

Installation

  • poetry νŒ¨ν‚€μ§€λ₯Ό μ΄μš©ν•΄μ„œ μ˜μ‘΄μ„±μ„ κ΄€λ¦¬ν•©λ‹ˆλ‹€.
# poetry μ„€μΉ˜ pip install poetry # μ˜μ‘΄μ„± νŒ¨ν‚€μ§€ μ„€μΉ˜ poetry install # poetry dotenv ν”ŒλŸ¬κ·ΈμΈ μ„€μΉ˜ poetry self add poetry-dotenv-plugin # OPENAI_API_KEY ν™˜κ²½λ³€μˆ˜ μ„€μ • poetry run dotenv set OPENAI_API_KEY {OPENAI_API_KEY} # DEEPL_API_KEY poetry run dotenv set DEEPL_API_KEY {DEEPL_API_KEY}

Dataset preparation

  • dataset 전체λ₯Ό λ²ˆμ—­ν•˜μ—¬ μ €μž₯ν•©λ‹ˆλ‹€.

  • run

poetry run python dataset_prepare.py

  • log
(base) persuade@nlp-server-10:/mnt/md0/persuade/self-instruct-eval-ko$ poetry run python dataset_prepare.py in_filepath: user_oriented_instructions.jsonl out_filepath: user_oriented_instructions_deepl_ko.jsonl 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 252/252 [00:07<00:00, 32.58it/s] in_filepath: user_oriented_instructions.jsonl out_filepath: user_oriented_instructions_chatgpt_ko.jsonl 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 252/252 [00:43<00:00, 5.81it/s] in_filepath: user_oriented_instructions.jsonl out_filepath: user_oriented_instructions_gpt4_ko.jsonl 100%|100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 252/252 [02:40<00:00, 1.57it/s]

Translate

  • unit function ν…ŒμŠ€νŠΈ μš©λ„μž…λ‹ˆλ‹€.

  • run example

poetry run python translate.py

  • log
(base) persuade@nlp-server-10:/mnt/md0/persuade/self-instruct-eval-ko$ poetry run python translate.py 원문: hello world! DEEPL: μ•ˆλ…•ν•˜μ„Έμš”! ChatGPT 3.5: μ•ˆλ…•, 세상! GPT-4: μ•ˆλ…•ν•˜μ„Έμš”, 세상! DEV MODE IS ON, only 5 objs are converted in_filepath: user_oriented_instructions.jsonl out_filepath: user_oriented_instructions_ko.jsonl 0it [00:00, ?it/s] ORIGINAL: {'id': 'user_oriented_task_0', 'motivation_app': 'Grammarly', 'instruction': 'The sentence you are given might be too wordy, complicated, or unclear. Rewrite the sentence and make your writing clearer by keeping it concise. Whenever possible, break complex sentences into multiple sentences and eliminate unnecessary words.', 'instances': [{'input': 'If you have any questions about my rate or if you find it necessary to increase or decrease the scope for this project, please let me know.', 'output': "If you have any questions about my rate or find it necessary to increase or decrease this project's scope, please let me know."}]} TRANSLATED: {'id': 'user_oriented_task_0', 'motivation_app': 'Grammarly', 'instruction': 'μ£Όμ–΄μ§„ λ¬Έμž₯이 λ„ˆλ¬΄ κΈΈκ±°λ‚˜ λ³΅μž‘ν•˜κ±°λ‚˜ λΆˆλΆ„λͺ…ν•  수 μžˆμŠ΅λ‹ˆλ‹€. λ¬Έμž₯을 λ‹€μ‹œ μ“°κ³  κ°„κ²°ν•˜κ²Œ μœ μ§€ν•˜μ—¬ 글을 λͺ…ν™•ν•˜κ²Œ λ§Œλ“œμ„Έμš”. κ°€λŠ₯ν•œ ν•œ λ³΅μž‘ν•œ λ¬Έμž₯을 μ—¬λŸ¬ λ¬Έμž₯으둜 λ‚˜λˆ„κ³  λΆˆν•„μš”ν•œ 단어λ₯Ό μ œκ±°ν•˜μ„Έμš”.', 'instances': [{'input': '제 μš”κΈˆμ— λŒ€ν•΄ κΆκΈˆν•œ 점이 μžˆκ±°λ‚˜ 이 ν”„λ‘œμ νŠΈμ˜ λ²”μœ„λ₯Ό λŠ˜λ¦¬κ±°λ‚˜ 쀄일 ν•„μš”κ°€ μžˆλ‹€κ³  μƒκ°λ˜λ©΄ μ•Œλ €μ£Όμ„Έμš”.', 'output': 'μ œκ°€ μ œμ‹œν•œ κΈˆμ•‘μ— λŒ€ν•œ 질문이 μžˆκ±°λ‚˜ 이 ν”„λ‘œμ νŠΈμ˜ λ²”μœ„λ₯Ό λŠ˜λ¦¬κ±°λ‚˜ 쀄일 ν•„μš”κ°€ μžˆλ‹€κ³  μƒκ°ν•˜μ‹œλ©΄ μ•Œλ €μ£Όμ„Έμš”.'}]} 1it [00:33, 33.88s/it] ORIGINAL: {'id': 'user_oriented_task_1', 'motivation_app': 'Grammarly', 'instruction': 'Analyze the word choice, phrasing, punctuation, and capitalization in the given email. How may the writer of this email sound to the reader? These tones include Disheartening, Accusatory, Worried, Curious, Surprised, Disapproving, Unassuming, Formal, Assertive, Confident, Appreciative, Concerned, Sad, Informal, Regretful, Encouraging, Egocentric, Joyful, Optimistic, and Excited.', 'instances': [{'input': "Hi Jen, \nI hope you're well. Can we catch up today? I'd appreciate your input on my presentation for tomorrow's meeting. I'd especially love it if you could double-check the sales numbers with me. There's a coffee in it for you!", 'output': 'Confident'}]} TRANSLATED: {'id': 'user_oriented_task_1', 'motivation_app': 'Grammarly', 'instruction': 'μ£Όμ–΄μ§„ μ΄λ©”μΌμ—μ„œ 단어 선택, ν‘œν˜„, ꡬ두점, λŒ€μ†Œλ¬Έμž μ‚¬μš©μ„ λΆ„μ„ν•˜μ„Έμš”. 이 μ΄λ©”μΌμ˜ μž‘μ„±μžκ°€ λ…μžμ—κ²Œ μ–΄λ–€ λŠλ‚Œμ„ 쀄 수 μžˆλ‚˜μš”? μ΄λŸ¬ν•œ λŠλ‚Œλ“€μ€ 낙심감, λΉ„λ‚œμ , κ±±μ •μŠ€λŸ¬μš΄, ν˜ΈκΈ°μ‹¬, λ†€λžŒ, 뢈승인, κ²Έμ†ν•œ, 곡식적, λ‹¨ν˜Έν•œ, μžμ‹ κ° μžˆλŠ”, κ°μ‚¬ν•˜λŠ”, μš°λ €ν•˜λŠ”, μŠ¬ν”ˆ, 비곡식적, ν›„νšŒν•˜λŠ”, 격렀적, 자기 쀑심적, 기쁜, 낙관적, 그리고 ν₯λΆ„ν•œ 것듀이 ν¬ν•¨λ©λ‹ˆλ‹€.', 'instances': [{'input': 'μ•ˆλ…• Jen,\n잘 μ§€λ‚΄κ³  μžˆλŠ”μ§€ κΆκΈˆν•΄. 였늘 λ§Œλ‚˜μ„œ μ–˜κΈ° μ’€ ν•  수 μžˆμ„κΉŒ? 내일 회의λ₯Ό μœ„ν•œ λ°œν‘œμžλ£Œμ— λŒ€ν•œ 의견 μ’€ λ“£κ³  μ‹Άμ–΄. νŠΉνžˆλ‚˜ 맀좜 숫자λ₯Ό 같이 확인해쀄 수 μžˆλ‹€λ©΄ 정말 μ’‹κ² μ–΄. 컀피 ν•œμž” μ‚¬μ€„κ²Œ!', 'output': 'μžμ‹ κ° μžˆλŠ”'}]} 2it [01:24, 43.92s/it] ORIGINAL: {'id': 'user_oriented_task_2', 'motivation_app': 'Grammarly', 'instruction': 'Rewrite the given text and correct grammar, spelling, and punctuation errors.', 'instances': [{'input': "If you'd told me year ago that today I would finish a marathon, I would of laughed. Your support had a huge affect on me!", 'output': "If you'd told me a year ago that today I would finish a marathon, I would have laughed. Your support had a huge effect on me!"}]} TRANSLATED: {'id': 'user_oriented_task_2', 'motivation_app': 'Grammarly', 'instruction': 'μ£Όμ–΄μ§„ ν…μŠ€νŠΈλ₯Ό λ‹€μ‹œ μž‘μ„±ν•˜κ³ , 문법, 철자 및 ꡬ두점 였λ₯˜λ₯Ό μˆ˜μ •ν•˜μ‹­μ‹œμ˜€.', 'instances': [{'input': 'λ§Œμ•½ μž‘λ…„μ— 였늘 λ§ˆλΌν†€μ„ μ™„μ£Όν•  거라고 말해쀬닀면, μ›ƒμ—ˆμ„ 것이닀. λ„ˆμ˜ μ§€μ§€κ°€ λ‚˜μ—κ²Œ 큰 영ν–₯을 λ―Έμ³€μ–΄!', 'output': 'λ§Œμ•½ μž‘λ…„μ— 였늘 λ‚˜λŠ” λ§ˆλΌν†€μ„ μ™„μ£Όν•  거라고 말해쀬닀면, μ›ƒμ—ˆμ„ κ±°μ˜ˆμš”. λ‹Ήμ‹ μ˜ μ§€μ§€κ°€ μ €μ—κ²Œ μ—„μ²­λ‚œ 영ν–₯을 λ―Έμ³€μ–΄μš”!'}]} 3it [01:55, 37.71s/it] ORIGINAL: {'id': 'user_oriented_task_3', 'motivation_app': 'Google Scholar', 'instruction': 'You are given a paper citation, convert it to the requested citation style.', 'instances': [{'input': 'Chicago: Vaswani, Ashish, Shazeer, Noam, Parmar, Niki, Uszkoreit, Jakob, Jones, Llion, Gomez, Aidan N., Kaiser, Lukasz, and Illia Polosukhin. "Attention Is All You Need." arXiv, (2017). https://doi.org/10.48550/arXiv.1706.03762.\nMLA:', 'output': 'Vaswani, Ashish, et al. "Attention Is All You Need." arXiv, 2017, https://doi.org/10.48550/arXiv.1706.03762.'}]} TRANSLATED: {'id': 'user_oriented_task_3', 'motivation_app': 'Google Scholar', 'instruction': '당신은 λ…Όλ¬Έ μΈμš©λ¬Έμ„ λ°›μ•˜μŠ΅λ‹ˆλ‹€. μš”μ²­λœ 인용 μŠ€νƒ€μΌλ‘œ λ³€κ²½ν•΄μ£Όμ„Έμš”.', 'instances': [{'input': 'μ‹œμΉ΄κ³ : λ°”μŠ€μ™€λ‹ˆ, μ•„μ‹œμ‹œ, 샀지어, λ…Έμ•”, 파마λ₯΄, λ‹ˆν‚€, μš°μ‹œμ½”λ ˆμ΄νŠΈ, μ•Όμ½₯, 쑴슀, 릴리온, κ³ λ©”μ¦ˆ, 에이단 μ—”., 카이저, λ£¨μΉ΄μ‹œ, 및 일리아 ν΄λ‘œμˆ˜ν‚¨. "μ£Όλͺ©λ§Œ 있으면 μΆ©λΆ„ν•©λ‹ˆλ‹€." arXiv, (2017). https://doi.org/10.48550/arXiv.1706.03762.\nMLA:', 'output': 'λ°”μŠ€μ™€λ‹ˆ, μ•„μ‹œμ‹œ λ“±. "μ£Όμ˜κ°€ μ „λΆ€μž…λ‹ˆλ‹€." arXiv, 2017, https://doi.org/10.48550/arXiv.1706.03762.'}]} 4it [02:34, 38.46s/it] ORIGINAL: {'id': 'user_oriented_task_4', 'motivation_app': 'Grammarly', 'instruction': "Desk jobs require writing a lot of emails, so it isn't surprising we get tired of repeating ourselves. Come up with several synonyms for the given word.", 'instances': [{'input': 'Sincerely', 'output': 'Best regards, All the best, Cheers, Best'}]} TRANSLATED: {'id': 'user_oriented_task_4', 'motivation_app': 'Grammarly', 'instruction': '책상 일은 λ§Žμ€ 이메일을 μž‘μ„±ν•΄μ•Ό ν•˜κΈ° λ•Œλ¬Έμ—, μš°λ¦¬κ°€ 계속 λ°˜λ³΅ν•΄μ„œ μ§€μΉ˜λŠ” 것은 λ†€λžμ§€ μ•Šλ‹€. μ£Όμ–΄μ§„ 단어에 λŒ€ν•œ λͺ‡ κ°€μ§€ λ™μ˜μ–΄λ₯Ό μƒκ°ν•΄λ³΄μ„Έμš”.', 'instances': [{'input': 'μ§„μ‹¬μœΌλ‘œ', 'output': 'κ°μ‚¬ν•©λ‹ˆλ‹€, λͺ¨λ‘ 쒋은 일 μžˆμœΌμ‹œκΈΈ, 건배, 졜고'}]} 5it [02:52, 31.04s/it] ORIGINAL: {'id': 'user_oriented_task_5', 'motivation_app': 'Gmail', 'instruction': 'If you could help me write an email to my friends inviting them to dinner on Friday, it would be greatly appreciated.', 'instances': [{'input': '', 'output': "Hi there,\n\nI hope you're all doing well. I'm inviting you over for dinner on Friday night. Please let me know if you can make it. I'll be cooking your favorite dishes!\n\nLooking forward to seeing you,"}]} TRANSLATED: {'id': 'user_oriented_task_5', 'motivation_app': 'Gmail', 'instruction': 'λ§Œμ•½ κΈˆμš”μΌ 저녁 식사에 μΉœκ΅¬λ“€μ„ μ΄ˆλŒ€ν•˜λŠ” 이메일을 μž‘μ„±ν•˜λŠ” 데 도와주신닀면 정말 κ°μ‚¬ν•˜κ² μŠ΅λ‹ˆλ‹€.', 'instances': [{'input': '', 'output': 'μ•ˆλ…•ν•˜μ„Έμš”,\n\nμ—¬λŸ¬λΆ„ λͺ¨λ‘ 잘 μ§€λ‚΄κ³  κ³„μ‹œκΈΈ λ°”λžλ‹ˆλ‹€. κΈˆμš”μΌ 밀에 저희 μ§‘μ—μ„œ 저녁식사λ₯Ό μœ„ν•΄ μ—¬λŸ¬λΆ„μ„ μ΄ˆλŒ€ν•˜κ³  μ‹ΆμŠ΅λ‹ˆλ‹€. κ°€λŠ₯ν•˜λ‹€λ©΄ μ•Œλ €μ£Όμ„Έμš”. μ—¬λŸ¬λΆ„μ΄ μ’‹μ•„ν•˜λŠ” μŒμ‹μ„ λ§Œλ“€μ–΄λ³Όκ²Œμš”!\n\nλ΅™κΈ°λ₯Ό κΈ°λŒ€ν•˜λ©°,'}]} 5it [03:17, 39.56s/it]

Eval

TBD

About

self-instruct unseen data eval in Korean

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors