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.
modelsmodule (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
generatemodule and the associated functions (json,choice…) have been deprecated. They are replaced by theGeneratorconstructor. 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 uniqueGeneratorobject.Documentation
TransformersVisionmodel 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_transformersjust like theTransformersmodel, but the second argument must be a processor instead of a tokenizer.Documentation
The
Exllamav2model 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
functionmodule and the associatedFunctionclass have been deprecated. They are replaced by theApplicationclass, which serves a similar purpose toFunction. There are two notable differences: anApplicationis 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
samplersmodule 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_loramethods on theVLLMandLlamaCppmodels have been deprecated. You should now load through theLlamainstance provided when initializing the model in the case of theLlamaCppmodel, and provide it as a keyword argument when calling the model in the case of theVLLMmodel.Modified
Some objects are maintained, but their interface or behavior has been modified.
Modelclasses (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 astreammethod that can be invoked directly by the user.Documentation
__init__method of theOpenAImodel class has been modified. While it previously accepted a client and anOpenAIConfigobject 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 anOpenAIConfiginstance when initializing the model, a deprecation warning will appear and your model will behave like a v0 model.We recommend using the
from_openaifunction instead of initializing models directly.Documentation
Documentation
samplersmentioned above is a part of this change of approach.Documentation
Added features
from_function that accepts an inference engine/client instance.Documentation
DottxtAnthopicGeminiOllamaSGLangTGITransformersMultiModelVLLMDocumentation
AsyncSGLangAsyncTGIAsyncVLLMGeneratorconstructor 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
Applicationclass has been added. AnApplicationis 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
Termclasses 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,CFGandFSM.Documentation
Beta Was this translation helpful? Give feedback.
All reactions