- Options for setting requests per minute (RPM) and tokens per minute (TPM) for models at your account.
- Methods for setting RPM and TPM from your workspace.
- Methods for turning off default prompt features to reduce token usage.
- Methods for calculating next token probabilities.
Token limits
Token limits refer to the maximum number of tokens that a language model can process in a single input prompt or output generation. A token limit affects how much text you can send to a model in one go. A language model provider should provide information about the token limits for each model that is associated with your account and API key. When running a big job in EDSL, you may encounter token limits, which can be managed by adjusting the token limits for a model.RPM: Requests Per Minute
RPM stands for Requests Per Minute, which measures the number of API requests that a user can make to a language model within a minute. This is a metric for managing the load and traffic that a model can handle.TPM: Tokens Per Minute
TPM stands for Tokens Per Minute, which is a metric for tracking the volume of tokens processed by a language model within a minute. This metric typically tracks usage for billing purposes.Default token limits
You can inspect and modify token limits for a model at the Keys page of your account:
We can also inspect the RPM and TPM for the model:
Modifying token limits
We can reset the default RPM and TPM and then check the new values:Methods for reducing token usage
There are several ways to reduce the tokens required to run a question or survey.Turning off question commments
Each question type (other than free_text) automatically includes a comment field that gives the answering model a place to put additional information about its response to a question. This serves as an outlet for a chatty model to return context about an answer without violating formatting instructions (e.g., a model may want to provide an explanation for a mutiple choice response but the answer to the question must only be one of the answer options). Question comments can also be useful when used with survey “memory” rules, giving a model an opportunity to simulate a “chain of thought” across multiple survey questions. (By default, questions are administered asynchronously; a model does not have context of other questions and answers in a survey unless memory rules are applied.) Comments can also provide insight into non-responsive (None) answers: a model may use the comments field to describe a point of confusion about a question. Because the question comment field requires additional tokens, it can sometimes be cost-effective to exclude the field from question prompts, especially when the comment is unlikely to be useful. This is done by passing a boolean parameter include_comment = False when constructing a question. For example, here we compare a question with comments left on and turned off:Coding question options
Question instructions can be modified to prompt a model to use codes (integers) in lieu of text responses for answer options, reducing generated tokens. This is done by passing a boolean parameter use_code = True to a Question when it is constructed. For example:
The prompts can also be inspected after the survey is run:
