Question Answering
Transformers
Safetensors
Korean
qwen2
text-generation
finance
accounting
stock
quant
economics
text-generation-inference
Instructions to use aiqwe/FinShibainu with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aiqwe/FinShibainu with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("question-answering", model="aiqwe/FinShibainu")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("aiqwe/FinShibainu") model = AutoModelForCausalLM.from_pretrained("aiqwe/FinShibainu", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| tags: | |
| - finance | |
| - accounting | |
| - stock | |
| - quant | |
| - economics | |
| language: | |
| - ko | |
| license: apache-2.0 | |
| datasets: | |
| - aiqwe/FinShibainu | |
| base_model: | |
| - Qwen/Qwen2.5-7B-Instruct | |
| pipeline_tag: question-answering | |
| library_name: transformers | |
| # FinShibainu Model Card | |
| + github: [https://github.com/aiqwe/FinShibainu](https://github.com/aiqwe/FinShibainu) | |
| + dataset: [https://huggingface.co/datasets/aiqwe/FinShibainu](https://huggingface.co/datasets/aiqwe/FinShibainu) | |
| ๋ชจ๋ธ์ [KRX LLM ๊ฒฝ์ง๋ํ ๋ฆฌ๋๋ณด๋](https://krxbench.koscom.co.kr/)์์ ์ฐ์์์ ์์ํ shibainu24 ๋ชจ๋ธ์ ๋๋ค. ๋ชจ๋ธ์ ๊ธ์ต, ํ๊ณ ๋ฑ ๊ธ์ต๊ด๋ จ ์ง์์ ๋ํ Text Generation์ ์ ๊ณตํฉ๋๋ค. | |
| + Vanilla model : [Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) | |
| ๋ฐ์ดํฐ์ ์์ง ๋ฐ ํ์ต์ ๊ด๋ จ๋ ์ฝ๋๋ [https://github.com/aiqwe/FinShibainu](https://github.com/aiqwe/FinShibainu)์ ์์ธํ๊ฒ ๊ณต๊ฐ๋์ด ์์ต๋๋ค. | |
| # Usage | |
| [https://github.com/aiqwe/FinShibainu](https://github.com/aiqwe/FinShibainu)์ example์ ์ฐธ์กฐํ๋ฉด ์ฝ๊ฒ inference๋ฅผ ํด๋ณผ ์ ์์ต๋๋ค. | |
| ๋๋ถ๋ถ์ Inference๋ RTX-3090 ์ด์์์ ๋จ์ผ GPU ๊ฐ๋ฅํฉ๋๋ค. | |
| ```shell | |
| pip install vllm | |
| ``` | |
| ```python | |
| import pandas as pd | |
| from vllm import LLM | |
| inputs = [ | |
| "์ธํ์์ฅ์์ ์ผ๋ณธ ์ํ์ ๋ฏธ๊ตญ ๋ฌ๋ฌ์ ํ์จ์ด ๋ ์์ฅ์์ ์ฝ๊ฐ์ ์ฐจ์ด๋ฅผ ๋ณด์ด๊ณ ์๋ค. ์ด๋ ๋ฌด์ํ ์ด์ต์ ์ป๊ธฐ ์ํ ์ ์ ํ ๊ฑฐ๋ ์ ๋ต์ ๋ฌด์์ธ๊ฐ?", | |
| "์ ์ฃผ์ธ์๊ถ๋ถ์ฌ์ฑ(BW)์์ ์ฑ๊ถ์๊ฐ ์ ์ฃผ์ธ์๊ถ์ ํ์ฌํ์ง ์์ ๊ฒฝ์ฐ ์ด๋ค ์ผ์ด ๋ฐ์ํ๋๊ฐ?", | |
| "๊ณต๋งค๋(Short Selling)์ ๋ํ ์ค๋ช ์ผ๋ก ์ณ์ง ์์ ๊ฒ์ ๋ฌด์์ ๋๊น?" | |
| ] | |
| llm = LLM(model="aiqwe/krx-llm-competition", tensor_parallel_size=1) | |
| sampling_params = SamplingParams(temperature=0.7, max_tokens=128) | |
| outputs = llm.generate(inputs, sampling_params) | |
| for o in outputs: | |
| print(o.prompt) | |
| print(o.outputs[0].text) | |
| print("*"*100) | |
| ``` | |
| # Model Card | |
| | Contents | Spec | | |
| |--------------------------------|-------------------------------------| | |
| | Base model | Qwen2.5-7B-Instruct | | |
| | dtype | bfloat16 | | |
| | PEFT | LoRA (r=8, alpha=64) | | |
| | Learning Rate | 1e-5 (varies by further training) | | |
| | LRScheduler | Cosine (warm-up: 0.05%) | | |
| | Optimizer | AdamW | | |
| | Distributed / Efficient Tuning | DeepSpeed v3, Flash Attention | | |
| # Datset Card | |
| Reference ๋ฐ์ดํฐ์ ์ ์ผ๋ถ ์ ์๊ถ ๊ด๊ณ๋ก ์ธํด Link๋ก ์ ๊ณตํฉ๋๋ค. | |
| MCQA์ QA ๋ฐ์ดํฐ์ ์ [https://huggingface.co/datasets/aiqwe/FinShibainu](https://huggingface.co/datasets/aiqwe/FinShibainu)์ผ๋ก ๊ณต๊ฐํฉ๋๋ค. | |
| ๋ํ [https://github.com/aiqwe/FinShibainu](https://github.com/aiqwe/FinShibainu)๋ฅผ ์ด์ฉํ๋ฉด ๋ค์ํ ์ ํธ๋ฆฌํฐ ๊ธฐ๋ฅ์ ์ ๊ณตํ๋ฉฐ, ๋ฐ์ดํฐ ์์ฑ Pipeline์ ์ฐธ์กฐํ ์ ์์ต๋๋ค. | |
| ## References | |
| | ๋ฐ์ดํฐ๋ช | url | | |
| |-----------------------------------|------------------------------------------------------------------------------------------| | |
| | ํ๊ตญ์ํ ๊ฒฝ์ ๊ธ์ต ์ฉ์ด 700์ | [Link](https://www.bok.or.kr/portal/bbs/B0000249/view.do?nttId=235017&menuNo=200765) | | |
| | ์ฌ๋ฌดํ๊ณ ํฉ์ฑ ๋ฐ์ดํฐ | ์์ฒด ์ ์ | | |
| | ๊ธ์ต๊ฐ๋ ์ฉ์ด์ฌ์ | [Link](https://terms.naver.com/list.naver?cid=42088&categoryId=42088) | | |
| | web-text.synthetic.dataset-50k | [Link](https://huggingface.co/datasets/Cartinoe5930/web_text_synthetic_dataset_50k) | | |
| | ์ง์๊ฒฝ์ ์ฉ์ด์ฌ์ | [Link](https://terms.naver.com/list.naver?cid=43668&categoryId=43668) | | |
| | ํ๊ตญ๊ฑฐ๋์ ๋น์ ๊ธฐ ๊ฐํ๋ฌผ | [Link](http://open.krx.co.kr/contents/OPN04/04020000/OPN04020000.jsp#b8943a5f87282cde0d653d1ae73431c9=1) | | |
| | ํ๊ตญ๊ฑฐ๋์๊ท์ | [Link](https://law.krx.co.kr/las/TopFrame.jsp&KRX) | | |
| | ์ด๋ณดํฌ์์ ์ฆ๊ถ๋ฐ๋ผ์ก๊ธฐ | [Link](https://main.krxverse.co.kr/_contents/ACA/02010200/file/220104_beginner.pdf) | | |
| | ์ฒญ์๋ ์ ์ํ ์ฆ๊ถํฌ์ | [Link](https://main.krxverse.co.kr/_contents/ACA/02010200/file/220104_teen.pdf) | | |
| | ๊ธฐ์ ์ฌ์ ๋ณด๊ณ ์ ๊ณต์์๋ฃ | [Link](https://opendart.fss.or.kr/) | | |
| | ์์ฌ๊ฒฝ์ ์ฉ์ด์ฌ์ | [Link](https://terms.naver.com/list.naver?cid=43668&categoryId=43668) | | |
| ## MCQA | |
| MCQA ๋ฐ์ดํฐ๋ Reference๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ๋ค์ง์ ๋คํ ๋ฌธ์ ๋ฅผ ์์ฑํ ๋ฐ์ดํฐ์ ์ ๋๋ค. ๋ฌธ์ ์ ๋ต ๋ฟ๋ง ์๋๋ผ Reasoning ํ ์คํธ๊น์ง ์์ฑํ์ฌ ํ์ต์ ์ถ๊ฐํ์์ต๋๋ค. | |
| ํ์ต์ ์ฌ์ฉ๋ ๋ฐ์ดํฐ๋ ์ฝ 4.5๋ง๊ฐ ๋ฐ์ดํฐ์ ์ด๋ฉฐ, tiktoken์ o200k_base(gpt-4o, gpt-4o-mini Tokenizer)๋ฅผ ๊ธฐ์ค์ผ๋ก ์ด 2์ฒ๋ง๊ฐ์ ํ ํฐ์ผ๋ก ํ์ต๋์์ต๋๋ค. | |
| | ๋ฐ์ดํฐ๋ช | ๋ฐ์ดํฐ ์ | ํ ํฐ ์ | | |
| |--------------------------------------|-----------|--------------| | |
| | ํ๊ตญ์ํ ๊ฒฝ์ ๊ธ์ต ์ฉ์ด 700์ | 1,203 | 277,114 | | |
| | ์ฌ๋ฌดํ๊ณ ๋ชฉ์ฐจ๋ฅผ ์ด์ฉํ ํฉ์ฑ๋ฐ์ดํฐ | 451 | 99,770 | | |
| | ๊ธ์ต๊ฐ๋ ์ฉ์ด์ฌ์ | 827 | 214,297 | | |
| | hf_web_text_synthetic_dataset_50k | 25,461 | 7,563,529 | | |
| | ์ง์๊ฒฝ์ ์ฉ์ด์ฌ์ | 2,314 | 589,763 | | |
| | ํ๊ตญ๊ฑฐ๋์ ๋น์ ๊ธฐ ๊ฐํ๋ฌผ | 1,183 | 230,148 | | |
| | ํ๊ตญ๊ฑฐ๋์๊ท์ | 3,015 | 580,556 | | |
| | ์ด๋ณดํฌ์์ ์ฆ๊ถ๋ฐ๋ผ์ก๊ธฐ | 599 | 116,472 | | |
| | ์ฒญ์๋ ์ ์ํ ์ฆ๊ถ ํฌ์ | 408 | 77,037 | | |
| | ๊ธฐ์ ์ฌ์ ๋ณด๊ณ ์ ๊ณต์์๋ฃ | 3,574 | 629,807 | | |
| | ์์ฌ๊ฒฝ์ ์ฉ์ด์ฌ์ | 7,410 | 1,545,842 | | |
| | **ํฉ๊ณ** | **46,445**| **19,998,931**| | |
| ## QA | |
| QA ๋ฐ์ดํฐ๋ Reference์ ์ง๋ฌธ์ ํจ๊ป Input์ผ๋ก ๋ฐ์ ์์ฑํ ๋ต๋ณ๊ณผ Reference ์์ด ์ง๋ฌธ๋ง์ Input์ผ๋ก ๋ฐ์ ์์ฑํ ๋ต๋ณ 2๊ฐ์ง๋ก ๊ตฌ์ฑ๋ฉ๋๋ค. | |
| Reference๋ฅผ ์ ๊ณต๋ฐ์ผ๋ฉด ๋ชจ๋ธ์ ๋ณด๋ค ์ ํํ ๋ต๋ณ์ ํ์ง๋ง ๋ชจ๋ธ๋ง์ ์ง์์ด ์ ํ๋์ด ๋ต๋ณ์ด ์ข๋ ์งง์์ง๊ฑฐ๋ ๋ค์์ฑ์ด ์ค์ด๋ค๊ฒ ๋ฉ๋๋ค. | |
| ์ด 4.8๋ง๊ฐ์ ๋ฐ์ดํฐ์ ๊ณผ 2์ต๊ฐ์ ํ ํฐ์ผ๋ก ํ์ต๋์์ต๋๋ค. | |
| | ๋ฐ์ดํฐ๋ช | ๋ฐ์ดํฐ ์ | ํ ํฐ ์ | | |
| |--------------------------------------|-----------|--------------| | |
| | ํ๊ตญ์ํ ๊ฒฝ์ ๊ธ์ต ์ฉ์ด 700์ | 1,023 | 846,970 | | |
| | ๊ธ์ต๊ฐ๋ ์ฉ์ด์ฌ์ | 4,128 | 3,181,831 | | |
| | ์ง์๊ฒฝ์ ์ฉ์ด์ฌ์ | 6,526 | 5,311,890 | | |
| | ํ๊ตญ๊ฑฐ๋์ ๋น์ ๊ธฐ ๊ฐํ๋ฌผ | 1,510 | 1,089,342 | | |
| | ํ๊ตญ๊ฑฐ๋์๊ท์ | 4,858 | 3,587,059 | | |
| | ๊ธฐ์ ์ฌ์ ๋ณด๊ณ ์ ๊ณต์์๋ฃ | 3,574 | 629,807 | | |
| | ์์ฌ๊ฒฝ์ ์ฉ์ด์ฌ์ | 29,920 | 5,981,839 | | |
| | **ํฉ๊ณ** | **47,965**| **199,998,931**| | |
| # Citation | |
| ```bibitex | |
| @misc{jaylee2024finshibainu, | |
| author = {Jay Lee}, | |
| title = {FinShibainu: Korean specified finance model}, | |
| year = {2024}, | |
| publisher = {GitHub}, | |
| journal = {GitHub repository}, | |
| url = {https://github.com/aiqwe/FinShibainu} | |
| } | |
| ``` |