Should we remove the model_name
param when instantiating models
#1580
Replies: 2 comments 3 replies
-
TLDR: the interface in Outlines v1 is a lot less easy to use than <v1. I'd prefer more convenience functionality, such as leaving in I think we leave it in, though you are right that it does not generally align with the current design. We may also clash with I usually tilt more towards being opinionated on the interface, such as with automatic JSON schema validation or setting a In my opinion, we've actually removed a lot convenience from the user. Outlines v1.0 is quite different in terms of simplicity of use, mostly because Outlines pre-v1 was extraordinarily simple to use. Our popularity likely arose largely because Outlines before v1 required very little modification of models, generators, etc. Outlines handled a lot of common, repeated, and annoying model-specific stuff from the user's hands. That said, the prior behavior regarding keyword forwarding was a bad experience for transformer configs for example, because you had to specify a dictionary. Lots of annoying little things arose partly because Outlines too care of slightly too much, but as with all things there has to be some kind of balance between v1's pure-unix style vs. <v1's ultra convenient interface. However, the specific case of In the old outlines, all you did was construct a single model class, which worked arbitrarily prior to inference time. Now, the name of the keyword argument changes at runtime, which makes user code more fragile and annoying to maintain. The current outlines supports easy model hot-swapping, whereas here changing the inference engine requires users touching possibly many parts of their code. In the proposed interface, a user that toggles between cloud and local compute would have to:
1 is an annoyance. Enough that I'd be irritated about it. 2 is not a huge problem in that users should probably know about their engine keywords, but this information is scattered all over the web and is not readily accessibly and standardized as it was prior to v1. My suggestions are not well suited to the design of Outlines v1, though. You are right that these convenience features start introducing incongruent behavior at the low level. I might prefer a second package with a simpler interface that is more opinionated, so perhaps this discussion is better suited elsewhere. |
Beta Was this translation helpful? Give feedback.
-
Closing the discussion as we decided to keep it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently many models accept a
model_name
argument in their__init__
function. This was added for convenience to allow users to only specify the model name once at first. Then the model name is given to the generate function of the provider at each model call without the user having to specify it in the inference parameters.An issue with this setup is that it's contrary to the general approach of Outlines v1 in which we delegate as much as possible to the provider's client/model and do not try to standardize their behavior.
I'm in favor of removing this feature as it adds complexity in terms of knowing Outlines-specific things for users. We want users to be able to use Outlines in a way as similar as possible to how they would use their provider mode.
For instance with Anthopic (their client's inference argument for the model name is called
model
):Beta Was this translation helpful? Give feedback.
All reactions