The Complete class of the Together Python Library allows you to easily integrate the Together API's completion functionality into your applications, allowing you to generate text with a single line of code.

See all commands with:

together complete --help

To create a completion query, simply run:

together complete "List places to visit in San Francisco."

By default, complete will query togethercomputer/RedPajama-INCITE-7B-Chat. You can pick a different model with --model or -m followed by the model string. For example, to query huggyllama/llama-7b, run:

together complete --model huggyllama/llama-7b "List places to visit in San Francisco."

together complete

  • PROMPT (string, required) -- A string providing context for the model to complete
  • --model,-m (string, optional) -- Model string to query. Default: togethercomputer/RedPajama-INCITE-7B-Chat
  • --max-tokens (integer, optional) -- Maximum number of tokens the model should generate. Default: 128
  • --stop (string, optional) -- List of stop words the model should stop generation at. Accepts multiple values. Default: ["<human>"]
  • --temperature(float, optional) -- A decimal number that determines the degree of randomness in the response. Default: 0.7
  • --top-p (float, optional) -- Used to dynamically adjust the number of choices for each predicted token based on the cumulative probabilities. A value of 1 will always yield the same output. A temperature less than 1 favors more correctness and is appropriate for question answering or summarization. A value greater than 1 introduces more randomness in the output. Default: 0.7
  • --top-k (integer, optional) -- Used to limit the number of choices for the next predicted word or token. It specifies the maximum number of tokens to consider at each step, based on their probability of occurrence. This technique helps to speed up the generation process and can improve the quality of the generated text by focusing on the most likely options. Default: 50
  • --repetition-penalty (float, optional) -- A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. Default: 1
  • --no-stream (bool, optional) -- Option to turn off streaming. Defaults to stream outputs.
  • --raw (bool, optional) -- Option to output raw response from server.