Update README.md
Browse files
README.md
CHANGED
|
@@ -146,6 +146,19 @@ generated_tokens = outputs[0, inputs.input_ids.shape[1]:]
|
|
| 146 |
print(tokenizer.decode(generated_tokens, skip_special_tokens=True))
|
| 147 |
```
|
| 148 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
|
| 150 |
## Chat SFT Training Metrics
|
| 151 |
|
|
|
|
| 146 |
print(tokenizer.decode(generated_tokens, skip_special_tokens=True))
|
| 147 |
```
|
| 148 |
|
| 149 |
+
## vLLM Integration:
|
| 150 |
+
|
| 151 |
+
You can also run the model in vLLM, using the above branch install:
|
| 152 |
+
|
| 153 |
+
```vllm serve --model_impl transformers --enforce-eager nanochat-students/nanochat-d20```
|
| 154 |
+
|
| 155 |
+
And then you can call the model like so:
|
| 156 |
+
|
| 157 |
+
```sh
|
| 158 |
+
url http://localhost:8000/v1/completions \
|
| 159 |
+
> -H "Content-Type: application/json" \
|
| 160 |
+
> -d '{"model": "nanochat-students/nanochat-d20", "prompt": "What is the capital of France?, "max_tokens": 7, "temperature": 0}'
|
| 161 |
+
```
|
| 162 |
|
| 163 |
## Chat SFT Training Metrics
|
| 164 |
|