Model reference · open weights
openchat-3.6-20240522 is an open-weight language model from openchat. openchat-3.6-8b-20240522 (BF16) weighs 16.1 GB; the smallest configuration that runs it is 2× RTX 3060 12 GB.
openchat-3.6-20240522 is an 8.0B parameter text-generation model developed by openchat. It supports a context length of 8192 tokens and uses a modified Llama 3 Instruct template for chat interactions. The model is distributed under the llama3 licence and is designed for general tasks, coding, and chat.
Summary of the openchat/openchat-3.6-8b-20240522 model card, 2026-10-01
What it is
| Released by | openchat |
|---|---|
| Type | Language models |
| Task | Text gen |
| Parameters (lead) | 8.0B |
| Context | 8,192 tokens |
| Runs with | transformers |
| Based on | meta-llama/Meta-Llama-3-8B |
| Released | 2024-05-07 |
| Popularity | 10k downloads / month |
| Weights | 16.1 GB (openchat-3.6-8b-20240522 (BF16), file size) |
| Licence | Open, with conditions |
What it runs on
Weights 16.1 GB (file size) · KV cache 131 MB per 1,000 tokens of context, at 16 bits (vLLM's default for this build; an 8-bit cache halves it) · runtime overhead from 745 MB on a small card · context up to 8,192 tokens.
| Card | Requests at once 8K tokens each | Requests at once 32K tokens each | Longest single request | Counted memory |
|---|---|---|---|---|
| RTX 3060 12 GB … RTX 4060 Ti 16 GB 2 smaller cards | — | — | — | |
| RTX 3090 24 GB | 6 | — | all 8K | 23.4 GB |
| RTX 4090 24 GB | 6 | — | all 8K | 23.4 GB |
| RTX 5090 32 GB | 13 | — | all 8K | 31.0 GB |
| L40S 48 GB | 25 | — | all 8K | 44.0 GB |
| A100 80 GB | 57 | — | all 8K | 78.2 GB |
| H100 80 GB | 53 | — | all 8K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 67 | — | all 8K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 80 | — | all 8K | 107 GB |
| H200 141 GB | 109 | — | all 8K | 138 GB |
| B200 180 GB | 143 | — | all 8K | 176 GB |
| 2× RTX 3060 12 GB tensor parallel | 5 | — | all 8K | 11.6 GB a card |
| 2× RTX 4060 Ti 16 GB tensor parallel | 12 | — | all 8K | 15.4 GB a card |
| 2× RTX 4090 24 GB tensor parallel | 27 | — | all 8K | 23.4 GB a card |
| 2× RTX 3090 24 GB tensor parallel | 27 | — | all 8K | 23.4 GB a card |
| Requests at once | 8K tokens each | 32K tokens each |
|---|---|---|
| 1 | 17.9 GB | — |
| 5 | 22.2 GB | — |
| 8 | 25.4 GB | — |
| 16 | 34.0 GB | — |
| 32 | 51.2 GB | — |
| 64 | 85.5 GB | — |
On one card, with vLLM's small-card settings (2,048 tokens a step). Cards of 70 GB and more reserve more per request and more overhead — each row above uses its own card's settings.
Estimates, not measurements, checked against published vLLM startup logs. The weights are the build's file size; the cache is calculated from its config (grouped-query attention); the overhead is an estimate of vLLM's own memory with that card's default settings. "Requests at once" is how many requests of that length vLLM admits — its reservation at full length, with --max-model-len set to that length; requests that stay shorter fit more. "Longest single request" is the most one request can hold there: below the model's maximum, vLLM starts only with --max-model-len set at or under it. "Counted memory" is vLLM's default 92 % of what CUDA reports for the card (the DGX Spark: about 100 GiB of its shared 128 GB). A tensor-parallel split pools the cards' memory and speeds each token up, at the cost of the link between them; a layer split (llama.cpp) holds more but does not make one request faster. Assumes vLLM 0.10 or later.
From the model card
To use this model, we highly recommend installing the OpenChat package by following the installation guide in our repository and using the OpenChat OpenAI-compatible API server by running the serving command from the table below. The server is optimized for high-throughput deployment using vLLM and can run on a consumer GPU with 24GB RAM. To enable tensor parallelism, append --tensor-parallel-size N to the serving command.
Once started, the server listens at localhost:18888 for requests and is compatible with the OpenAI ChatCompletion API specifications. Please refer to the example request below for reference. Additionally, you can use the OpenChat Web UI for a user-friendly experience.
If you want to deploy the server as an online service, you can use --api-keys sk-KEY1 sk-KEY2 ... to specify allowed API keys and --disable-log-requests --disable-log-stats --log-file openchat.log for logging only to a file. For security purposes, we recommend using an HTTPS gateway in front of the server.
| Model | Size | Context | Weights | Serving |
|---|---|---|---|---|
| OpenChat-3.6-20240522 | 8B | 8192 | Huggingface | python -m ochat.serving.openai_api_server --model openchat/openchat-3.6-8b-20240522 |
curl http://localhost:18888/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "openchat_3.6",
"messages": [{"role": "user", "content": "You are a large language model named OpenChat. Write a poem to describe yourself"}]
}'
💡 Default Mode: Best for coding, chat and general tasks.
It's a modified version of the Llama 3 Instruct template, the only difference is role names, which are either GPT4 Correct User or GPT4 Correct Assistant
⚠️ Notice: Remember to set `` as end of generation token.
The default template is also available as the integrated tokenizer.chat_template, which can be used instead of manually specifying the template:
messages = [
{"role": "user", "content": "Hello"},
{"role": "assistant", "content": "Hi"},
{"role": "user", "content": "How are you today?"}
]
tokens = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "openchat/openchat-3.6-8b-20240522"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
messages = [
{"role": "user", "content": "Explain how large language models work in detail."},
]
input_ids = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
outputs = model.generate(input_ids,
do_sample=True,
temperature=0.5,
max_new_tokens=1024
)
response = outputs[0][input_ids.shape[-1]:]
print(tokenizer.decode(response, skip_special_tokens=True))
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.
Safety OpenChat may sometimes generate harmful, hate speech, biased responses, or answer unsafe questions. It's crucial to apply additional AI safety measures in use cases that require safe and moderated responses.
We look forward to hearing from you and collaborating on this exciting project!
Project Lead:
@article{wang2023openchat,
title={OpenChat: Advancing Open-source Language Models with Mixed-Quality Data},
author={Wang, Guan and Cheng, Sijie and Zhan, Xianyuan and Li, Xiangang and Song, Sen and Liu, Yang},
journal={arXiv preprint arXiv:2309.11235},
year={2023}
}
Quoted from the model card on Hugging Face — the full card is behind the Hugging Face link above.