Update README.md
Browse files
README.md
CHANGED
@@ -15,13 +15,29 @@ language:
|
|
15 |
|
16 |
# Usage
|
17 |
[https://github.com/aiqwe/krx-llm-competition](https://github.com/aiqwe/krx-llm-competition)์ example์ ์ฐธ์กฐํ๋ฉด ์ฝ๊ฒ inference๋ฅผ ํด๋ณผ ์ ์์ต๋๋ค.
|
|
|
18 |
|
19 |
```shell
|
20 |
pip install vllm
|
21 |
```
|
22 |
|
23 |
```python
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
```
|
26 |
|
27 |
# Model Card
|
|
|
15 |
|
16 |
# Usage
|
17 |
[https://github.com/aiqwe/krx-llm-competition](https://github.com/aiqwe/krx-llm-competition)์ example์ ์ฐธ์กฐํ๋ฉด ์ฝ๊ฒ inference๋ฅผ ํด๋ณผ ์ ์์ต๋๋ค.
|
18 |
+
๋๋ถ๋ถ์ Inference๋ RTX-3090 ์ด์์์ ๋จ์ผ GPU ๊ฐ๋ฅํฉ๋๋ค.
|
19 |
|
20 |
```shell
|
21 |
pip install vllm
|
22 |
```
|
23 |
|
24 |
```python
|
25 |
+
import pandas as pd
|
26 |
+
from vllm import LLM
|
27 |
+
|
28 |
+
inputs = [
|
29 |
+
"์ธํ์์ฅ์์ ์ผ๋ณธ ์ํ์ ๋ฏธ๊ตญ ๋ฌ๋ฌ์ ํ์จ์ด ๋ ์์ฅ์์ ์ฝ๊ฐ์ ์ฐจ์ด๋ฅผ ๋ณด์ด๊ณ ์๋ค. ์ด๋ ๋ฌด์ํ ์ด์ต์ ์ป๊ธฐ ์ํ ์ ์ ํ ๊ฑฐ๋ ์ ๋ต์ ๋ฌด์์ธ๊ฐ?",
|
30 |
+
"์ ์ฃผ์ธ์๊ถ๋ถ์ฌ์ฑ(BW)์์ ์ฑ๊ถ์๊ฐ ์ ์ฃผ์ธ์๊ถ์ ํ์ฌํ์ง ์์ ๊ฒฝ์ฐ ์ด๋ค ์ผ์ด ๋ฐ์ํ๋๊ฐ?",
|
31 |
+
"๊ณต๋งค๋(Short Selling)์ ๋ํ ์ค๋ช
์ผ๋ก ์ณ์ง ์์ ๊ฒ์ ๋ฌด์์
๋๊น?"
|
32 |
+
]
|
33 |
+
|
34 |
+
llm = LLM(model="aiqwe/krx-llm-competition", tensor_parallel_size=1)
|
35 |
+
sampling_params = SamplingParams(temperature=0.7, max_tokens=128)
|
36 |
+
outputs = llm.generate(inputs, sampling_params)
|
37 |
+
for o in outputs:
|
38 |
+
print(o.prompt)
|
39 |
+
print(o.outputs[0].text)
|
40 |
+
print("*"*100)
|
41 |
```
|
42 |
|
43 |
# Model Card
|