Text Generation
Transformers
PyTorch
Safetensors
English
mistral
instruct
finetune
chatml
gpt4
synthetic data
distillation
conversational
text-generation-inference
Instructions to use teknium/OpenHermes-2.5-Mistral-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use teknium/OpenHermes-2.5-Mistral-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="teknium/OpenHermes-2.5-Mistral-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("teknium/OpenHermes-2.5-Mistral-7B") model = AutoModelForCausalLM.from_pretrained("teknium/OpenHermes-2.5-Mistral-7B", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use teknium/OpenHermes-2.5-Mistral-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "teknium/OpenHermes-2.5-Mistral-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "teknium/OpenHermes-2.5-Mistral-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/teknium/OpenHermes-2.5-Mistral-7B
- SGLang
How to use teknium/OpenHermes-2.5-Mistral-7B 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 "teknium/OpenHermes-2.5-Mistral-7B" \ --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": "teknium/OpenHermes-2.5-Mistral-7B", "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 "teknium/OpenHermes-2.5-Mistral-7B" \ --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": "teknium/OpenHermes-2.5-Mistral-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use teknium/OpenHermes-2.5-Mistral-7B with Docker Model Runner:
docker model run hf.co/teknium/OpenHermes-2.5-Mistral-7B
Jarvice
#40 opened 10 months ago
by
DeAngeloown
Is this can use turkish language
#39 opened about 1 year ago
by
NecmeddinHD
Update README.md
#37 opened almost 2 years ago
by
surprisedPikachu007
Interview request: genAI evaluation & documentation
#36 opened almost 2 years ago
by
evatang
曾在科比头上暴砍38分!你敢想林书豪的一鸣惊人,是憋多久的厚积薄发!
#35 opened about 2 years ago
by
dyh9
How to do batch inference?
1
#34 opened over 2 years ago
by
abhijeet-ta
Wrong humaneval in the model description
#33 opened over 2 years ago
by
Orenguteng
Adding Evaluation Results
#32 opened over 2 years ago
by
leaderboard-pr-bot
multilingual capabilities?
#31 opened over 2 years ago
by
Tim1785
Request: DOI
#30 opened over 2 years ago
by
EmilMarian
[AUTOMATED] Model Memory Requirements
#29 opened over 2 years ago
by
model-sizer-bot
Padding side
#28 opened over 2 years ago
by
llama2thedog
Suppress the prompt from appearing in the generated response
1
#27 opened over 2 years ago
by
InformaticsSolutions
Adding the dataset used to train this model
#26 opened over 2 years ago
by
davanstrien
Mistral 1 or 2?
5
#23 opened over 2 years ago
by
lazyDataScientist
Dataset
👍 1
2
#22 opened over 2 years ago
by
ewqr2130
How much VRAM does this model need?
6
#21 opened over 2 years ago
by
Ziizu
Code issue
1
#19 opened over 2 years ago
by
PickleAI
What is the proper format to fine-tune this model?
2
#17 opened over 2 years ago
by
Shaike04
Temperate for 3-bit quantized model
1
#16 opened over 2 years ago
by
WinstonChen
question about preset in ML studio
1
#15 opened over 2 years ago
by
mattermos
Question regarding BOS-token when chatting with the model.
1
#14 opened over 2 years ago
by
Ghaandy
Axolotl prompt format (sharegpt, chatml) could differ from yours
1
#13 opened over 2 years ago
by
timlim123
Function Calling
3
#11 opened over 2 years ago
by
corentinm7
Can the training procedure be shared?
4
#9 opened over 2 years ago
by
timlim123
Training Hyperparameters
2
#8 opened over 2 years ago
by
ekurtulus
TypeError: transformers.generation.utils.GenerationMixin.generate() argument after ** must be a mapping, not Tensor
3
#5 opened almost 3 years ago
by
Pazuzzu
Adding Evaluation Results
#4 opened almost 3 years ago
by
leaderboard-pr-bot