Text Generation
Transformers
PyTorch
mistral
openchat
C-RLFT
conversational
text-generation-inference
Instructions to use openchat/openchat_3.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openchat/openchat_3.5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openchat/openchat_3.5") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("openchat/openchat_3.5") model = AutoModelForCausalLM.from_pretrained("openchat/openchat_3.5", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use openchat/openchat_3.5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openchat/openchat_3.5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openchat/openchat_3.5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/openchat/openchat_3.5
- SGLang
How to use openchat/openchat_3.5 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "openchat/openchat_3.5" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openchat/openchat_3.5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "openchat/openchat_3.5" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openchat/openchat_3.5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use openchat/openchat_3.5 with Docker Model Runner:
docker model run hf.co/openchat/openchat_3.5
Commit History
-
add AIBOM
Verified signatureDear model owner(s), We are a group of researchers investigating the usefulness of sharing AIBOMs (Artificial Intelligence Bill of Materials) to document AI models – AIBOMs are machine-readable structured lists of components (e.g., datasets and models) used to enhance transparency in AI-model supply chains. To pursue the above-mentioned objective, we identified popular models on HuggingFace and, based on your model card (and some configuration information available in HuggingFace), we generated your AIBOM according to the CyclonDX (v1.6) standard (see https://cyclonedx.org/docs/1.6/json/). AIBOMs are generated as JSON files by using the following open-source supporting tool: https://github.com/MSR4SBOM/ALOHA (technical details are available in the research paper: https://github.com/MSR4SBOM/ALOHA/blob/main/ALOHA.pdf). The JSON file in this pull request is your AIBOM (see https://github.com/MSR4SBOM/ALOHA/blob/main/documentation.json for details on its structure). Clearly, the subm…61754a3
-
Update README.md
Verified signature0fc98e3
-
Update README.md
Verified signaturec8ac815
-
Update README.md
e4d87b9
-
Update README.md
99d59d4
-
Update README.md
2b2dbf0 -
Update README.md
effe26a
-
Update README.md
75a0c61
-
Update README.md
7e65595
-
Add chat template (#27)
- Update README (75452cee6bfeadf3595db327ad642f058c3264f0) - Add chat template (69a339b1e8b0bad0db1bb714bfdb851854a3fff8)a11af6b
-
Create generation_config.json (#21)
- Create generation_config.json (6630da04b1fca217767bbec423f22f10b684d735) Co-authored-by: fenglui <fenglui@users.noreply.huggingface.co>5b874a3
-
Update README.md
600a344
-
Update model card metadata
2d39b2e
-
Update dataset details in model card (#11)
- Update dataset details in model card (18814554d4eae9ac565b627f11442871fb2c933f)37ca7ce
-
Update README.md
0be788e -
Update README.md
b6c8863 -
Update README.md
5563fa7 -
Update README.md
17ccd19
-
Update README.md
eebadee -
Add baselines
6814591
-
Update README.md
4d04f08 -
Update README.md
3618d9b -
EOS should be 32000 (#4)
- EOS should be 32000 (60554874db2927237b558c23a990eb20af8dc592) Co-authored-by: Tom Jobbins <TheBloke@users.noreply.huggingface.co>d4024c4 -
EOS should be 32000 (#3)
- EOS should be 32000 (a74ef171432c307c8c5f3da002536d184e815269) Co-authored-by: Tom Jobbins <TheBloke@users.noreply.huggingface.co>394df69
-
[doc] update README
f85ea3d -
Update model card
17083ef
-
Add fast tokenizer support
81689a2
-
bf16
0ba9dfe -
fp16
1387ce5 -
weights
1025f2b -
initial commit
f897c6b