Release Note v1.0 #1605
Closed
RobinPicard
started this conversation in
General
Replies: 2 comments 3 replies
-
Looks great! I would add a mention of the fact that models can be called directly when you introduce the |
Beta Was this translation helpful? Give feedback.
1 reply
-
Also: we do standardize the max tokens keyword, and I think that's the only one. We may wish to note that in the keyword section. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is the proposed release note (in GitHub) for the v1.0 release.
Release Note
Why a new major version?
The v1 intends on making Outlines more closely focused on constrained generation. To do so, we delegate a wider range of tasks to the users and inference libraries. On top of making Outlines leaner, this design provides more flexibility to the users and let them use interfaces they are already familiar with.
Our approach is inspired by the unix best practices — each element does one thing well, and we compose those functional elements.
As this new version deprecates some previously available features of Outlines, we have written a migration guide that gives detailed information on how to upgrade your v0 code to v1.
Deprecated
All deprecated features listed below will be removed in version 1.1.0. Until then, a warning will be displayed with information on how to migrate your code to v1.
models
module (transformers
,openai
, etc.) have been deprecated. They are replaced by equivalent functions prefixed withfrom_
such asfrom_transformers
,from_openai
, etc. The new loader functions accept different arguments compared to the old ones. They now typically require an instance of an engine/client from the associated inference library. This change was made to avoid duplicating inference library logic and to give users more control over inference engine/client initialization.Documentation
generate
module and the associated functions (json
,choice
…) have been deprecated. They are replaced by theGenerator
constructor. While you had to select the right generate function for your output type, you can now provide any output type supported by Outlines to the uniqueGenerator
object.Documentation
TransformersVision
model has been deprecated. It's replaced byTransformersMultiModal
, which is more general as it supports additional input types beyond images, such as audio. When calling it, instead of providing the prompt and image assets separately, both should now be included in a single dictionary. The model is loaded withfrom_transformers
just like theTransformers
model, but the second argument must be a processor instead of a tokenizer.Documentation
The
Exllamav2
model has been deprecated without replacement because its interface is not fully compatible with Outlines. We had to implement cumbersome patching to make it work, so we decided to remove it entirely.The
function
module and the associatedFunction
class have been deprecated. They are replaced by theApplication
class, which serves a similar purpose toFunction
. There are two notable differences: anApplication
is not initialized with a model (a model must be provided when calling the object), and template variables must be provided in a dictionary instead of as keyword arguments when calling theApplication
.Documentation
samplers
module and the associated objects (multinomial
,greedy
…) have been deprecated. You should now use the inference arguments specific to the inference library your model is based on to control the sampling.load_lora
methods on theVLLM
andLlamaCpp
models have been deprecated. You should now load through theLlama
instance provided when initializing the model in the case of theLlamaCpp
model, and provide it as a keyword argument when calling the model in the case of theVLLM
model.Modified
Some objects are maintained, but their interface or behavior has been modified.
Model
classes (Transformers
,OpenAI
, etc.) has been significantly modified. Models can now be called directly with a prompt and an output type without having to create a generator first. Additionally, all models have astream
method that can be invoked directly by the user.Documentation
__init__
method of theOpenAI
model class has been modified. While it previously accepted a client and anOpenAIConfig
object instance, it now accepts a client and a model name. The inference arguments from the config object should now be specified when calling the model to more closely align with the OpenAI Python library's functionality. If you provide anOpenAIConfig
instance when initializing the model, a deprecation warning will appear and your model will behave like a v0 model.We recommend using the
from_openai
function instead of initializing models directly.Documentation
Documentation
samplers
mentioned above is a part of this change of approach.Documentation
Added features
from_
function that accepts an inference engine/client instance.Documentation
Dottxt
Anthopic
Gemini
Ollama
SGLang
TGI
TransformersMultiModel
VLLM
Documentation
AsyncSGLang
AsyncTGI
AsyncVLLM
Generator
constructor has been added. It accepts a model and an output type as arguments and returns a generator object that can be used to generate text by providing a prompt and inference arguments. The interest of a generator is that it's reusable such that the user does not have to specify the output type they want each time and the output type compilation (when applicable) happens only once.Documentation
Application
class has been added. AnApplication
is initialized with a prompt template and an output type. The application object returned can then be called with a model, a dictionary containing values for the template variables and inference arguments. The objective of this object is to let users easily switch from a model to another for a given set of prompt and output type.Documentation
Term
classes and functions have been added. Terms (Regex
,String
…) can be used as output types to generate text with models or generators (they are turned into a regex). The term functions (either
,optional
,at_least
…) are useful to build more complex regex patterns by combining terms. On top of the objects related to regex patterns, there are also 3 terms that are intended to be used by themselves as output types:JsonSchema
,CFG
andFSM
.Documentation
Beta Was this translation helpful? Give feedback.
All reactions