aiqwe commited on
Commit
1118c1a
ยท
verified ยท
1 Parent(s): 13cdc80

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +17 -1
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
- TBD
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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