[ot][spam][log] attempt bits: talk to a language model on list

mailbombbin mailbombbin at gmail.com
Mon Sep 11 14:50:21 PDT 2023


...> The language model interface has a forward() call and a more()
call. It stores the input_ids from the last call. How would I modify
it to provide for examples it would infer from? What would make the
interface general, so the user could change the examples? Be concise.

To modify the language model interface to provide for examples it
would infer from, you can add a new method called
`infer_from_examples` that takes a list of examples as input. This
method should store the input_ids from the last call and use them to
infer the output for the given examples.

Here's an example of how you could modify the interface:
```
class LanguageModel:
    def __init__(self, model_name):
        self.model_name = model_name
        self.input_ids = None

    def forward(self, input_ids):
        self.input_ids = input_ids
        # Perform forward pass

    def more(self, input_ids):
        self.input_ids = input_ids
        # Perform more pass

    def infer_from_examples(self, examples):
        self.input_ids = examples
        # Perform inference
```
This modified interface allows the user to provide a list of examples
as input to the `infer_from_examples` method, which will then use the
stored input_ids from the last call to perform inference on the given
examples.


More information about the cypherpunks mailing list