Model reference · open weights
openchat_v2_w is an open-weight language model from openchat. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Maker | openchat |
|---|---|
| Type | Language models |
| Task | Text gen |
| Context | 2k tokens |
| Runs with | transformers |
| Released | 2023-07-07 |
| Popularity | 111 downloads / month |
| Licence | Commercial licence needed |
About
The OpenChat v2 family is inspired by offline reinforcement learning, including conditional behavior cloning (OpenChat-v2) and weighted behavior cloning (OpenChat-v2-w).
We provide the full source code, including an inference server compatible with the "ChatCompletions" API, in the OpenChat GitHub repository.
OpenChat also includes a web UI for a better user experience. See the GitHub repository for instructions.
The conversation template involves concatenating tokens, and cannot be expressed in plain-text.
Besides base model vocabulary, an end-of-turn token `` is added.
Here is an example of single-round conversation template:
def tokenize_single_input(tokenizer, prompt):
# OpenChat V2
human_prefix = "User:"
prefix = "Assistant GPT4:"
eot_token = ""
bos_token = ""
def _tokenize(text):
return tokenizer.convert_tokens_to_ids(tokenizer._tokenize(text))
def _tokenize_special(special_name):
return tokenizer.convert_tokens_to_ids(special_name)
return [_tokenize_special(bos_token)] + _tokenize(human_prefix) + _tokenize(prompt) + [_tokenize_special(eot_token)] + \
_tokenize(prefix)
To explore conditional language models, you can also set prefix = "Assistant GPT3:" to mimic ChatGPT behavior (this may cause performance degradation).
Hint: In BPE, tokenize(A) + tokenize(B) does not always equals to tokenize(A + B)
Foundation Model Limitations Despite its advanced capabilities, OpenChat is still bound by the limitations inherent in its foundation models. These limitations may impact the model's performance in areas such as:
Hallucination of Non-existent Information OpenChat may sometimes generate information that does not exist or is not accurate, also known as "hallucination". Users should be aware of this possibility and verify any critical information obtained from the model.
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys openchat-v2-w for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (openchat-v2-w below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/chat/completions \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"openchat-v2-w","messages":[{"role":"user","content":"Hello"}]}'
Create an account — your API key is available in the console. 5M tokens/month currently included with every new account at launch.