You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Outlines provides support for text generation constrained by regular expressions. Since regular expressions are expressed as simple raw string literals, regex strings must wrapped in an `outlines.types.Regex` object to clarify the expected return type.
167
+
Outlines provides support for text generation constrained by regular expressions. Since regular expressions are expressed as simple raw string literals, regex strings must wrapped in an `outlines.types.Regex` object.
Models can be divided into two categories: local models and server-based models.
65
67
66
-
In the case of local models, the text generation happens within the inference library object used to instantite the model. This gives Outlines direct access to the generation process (through a logits processor) and means all structured generation output types are available.
68
+
In the case of local models, the text generation happens within the inference library object used to instantiate the model. This gives Outlines direct access to the generation process (through a logits processor) and means all structured generation output types are available.
model = outlines.from_vllm(openai_client, "microsoft/Phi-3-mini-4k-instruct")
198
-
```
199
175
200
176
## Generating Text
201
177
@@ -221,7 +197,7 @@ for chunk in model.streaming("Write a short story about a cat.")
221
197
222
198
## Structured Generation
223
199
224
-
Outlines follows a simple pattern that mirrors Python's own type system for structured output. Simply specify the desired output type as you would when using type hinting with a function, and Outlines will ensure your data matches that structure exactly.
200
+
Outlines follows a simple pattern that mirrors Python's own type system for structured outputs. Simply specify the desired output type as you would when using type hinting with a function, and Outlines will ensure your data matches that structure exactly.
225
201
226
202
Supported output types can be organized in 5 categories:
227
203
@@ -235,7 +211,7 @@ Consult the section on [Output Types](../../features/core/output_types.md) in th
235
211
236
212
In the meantime, you can find below examples of using each of the five output type categories:
237
213
238
-
=== "Basic Yypes"
214
+
=== "Basic Types"
239
215
240
216
```python
241
217
model = <your_model_as_defined_above>
@@ -332,7 +308,7 @@ In the meantime, you can find below examples of using each of the five output ty
332
308
print(result) # '2 + 3'
333
309
```
334
310
335
-
It's important to note that not all output types are available for all models due to limitations in the underline inference libraries. The [Models](../features/models/index.md) section of the features documentation includes a features matrix to easily visualize output type availabilities.
311
+
It's important to note that not all output types are available for all models due to limitations in the underlying inference engines. The [Models](../features/models/index.md) section of the features documentation includes a features matrix that summarize the availability of output types.
Copy file name to clipboardExpand all lines: docs/guide/migration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Outlines 1.0 introduces some breaking changes that affect the way you use the li
4
4
5
5
This guide will help you migrate your code to the new version.
6
6
7
-
All previous functionality will be supported until Outlines version 1.1.0, but a warning message will be displayed to remind you to migrate your code and provide instructions to help you do so. Please migrate your code to the v1 as soon as possible.
7
+
All previous functionalities will be supported until Outlines version 1.1.0, but a warning message will be displayed to remind you to migrate your code and provide instructions to help you do so. Please migrate your code to the v1 as soon as possible.
0 commit comments