Update README.md
Browse files
README.md
CHANGED
|
@@ -96,16 +96,20 @@ datasets:
|
|
| 96 |
|
| 97 |
---
|
| 98 |
|
| 99 |
-
## Running with the `
|
| 100 |
|
| 101 |
You can initialize the model and processor for inference with `pipeline` as follows.
|
| 102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
```python
|
| 104 |
from openai import OpenAI
|
| 105 |
|
| 106 |
client = OpenAI(
|
| 107 |
base_url="model-endpoint",
|
| 108 |
-
api_key="api-key"
|
| 109 |
)
|
| 110 |
|
| 111 |
SYSTEM_PROMPT = """๋น์ ์ ์คํธ ๋ฌธ์๋ก ํ์ ํ ๊ทผ๊ฑฐ๋ฅผ ์์ฑํ๋ ๋ํ ์ธ์ด ๋ชจ๋ธ์
๋๋ค.
|
|
@@ -141,18 +145,14 @@ response = client.chat.completions.create(
|
|
| 141 |
)
|
| 142 |
print(response.choices[0].message.content)
|
| 143 |
|
| 144 |
-
|
|
|
|
|
|
|
| 145 |
- ํ์ ๊ทผ๊ฑฐ: ๋ด์ฉ์ ๋ชฉ์
|
| 146 |
- ์คํธ ํ์ ์ด์ : ์ ์คํธ ๋ฌธ์๋ ๊ธ์ต ์ํ๊ณผ ๋์ถ ๊ด๋ จ ๊ถ์ ๋ด์ฉ์ ํฌํจํ๊ณ ์์ผ๋ฉฐ,
|
| 147 |
โ์ง๊ธ ๋ฐ๋กโ, โ์ฆ์ ์ ์ฒญโ๊ณผ ๊ฐ์ ์ฌ๋ฆฌ์ ์๋ฐ ์ด๊ตฌ๋ฅผ ์ฌ์ฉํ์ฌ ์์ ์์ ํ๋์ ์ ๋ํ๊ณ ์์ต๋๋ค.
|
| 148 |
```
|
| 149 |
|
| 150 |
-
## Running with vLLM
|
| 151 |
-
|
| 152 |
-
```sh
|
| 153 |
-
vllm serve Devocean-06/Spam_Filter-gemma
|
| 154 |
-
```
|
| 155 |
-
|
| 156 |
---
|
| 157 |
|
| 158 |
## Software
|
|
|
|
| 96 |
|
| 97 |
---
|
| 98 |
|
| 99 |
+
## Running with the `vllm` API
|
| 100 |
|
| 101 |
You can initialize the model and processor for inference with `pipeline` as follows.
|
| 102 |
|
| 103 |
+
```sh
|
| 104 |
+
vllm serve Devocean-06/Spam_Filter-gemma
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
```python
|
| 108 |
from openai import OpenAI
|
| 109 |
|
| 110 |
client = OpenAI(
|
| 111 |
base_url="model-endpoint",
|
| 112 |
+
api_key="api-key"
|
| 113 |
)
|
| 114 |
|
| 115 |
SYSTEM_PROMPT = """๋น์ ์ ์คํธ ๋ฌธ์๋ก ํ์ ํ ๊ทผ๊ฑฐ๋ฅผ ์์ฑํ๋ ๋ํ ์ธ์ด ๋ชจ๋ธ์
๋๋ค.
|
|
|
|
| 145 |
)
|
| 146 |
print(response.choices[0].message.content)
|
| 147 |
|
| 148 |
+
```
|
| 149 |
+
## ๐ง Example Output
|
| 150 |
+
```sh
|
| 151 |
- ํ์ ๊ทผ๊ฑฐ: ๋ด์ฉ์ ๋ชฉ์
|
| 152 |
- ์คํธ ํ์ ์ด์ : ์ ์คํธ ๋ฌธ์๋ ๊ธ์ต ์ํ๊ณผ ๋์ถ ๊ด๋ จ ๊ถ์ ๋ด์ฉ์ ํฌํจํ๊ณ ์์ผ๋ฉฐ,
|
| 153 |
โ์ง๊ธ ๋ฐ๋กโ, โ์ฆ์ ์ ์ฒญโ๊ณผ ๊ฐ์ ์ฌ๋ฆฌ์ ์๋ฐ ์ด๊ตฌ๋ฅผ ์ฌ์ฉํ์ฌ ์์ ์์ ํ๋์ ์ ๋ํ๊ณ ์์ต๋๋ค.
|
| 154 |
```
|
| 155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
---
|
| 157 |
|
| 158 |
## Software
|