Text Generation
Transformers
PyTorch
Safetensors
English
mistral
conversational
text-generation-inference
Instructions to use dphn/dolphin-2.1-mistral-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dphn/dolphin-2.1-mistral-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dphn/dolphin-2.1-mistral-7b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dphn/dolphin-2.1-mistral-7b") model = AutoModelForCausalLM.from_pretrained("dphn/dolphin-2.1-mistral-7b") 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
- vLLM
How to use dphn/dolphin-2.1-mistral-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dphn/dolphin-2.1-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": "dphn/dolphin-2.1-mistral-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dphn/dolphin-2.1-mistral-7b
- SGLang
How to use dphn/dolphin-2.1-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 "dphn/dolphin-2.1-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": "dphn/dolphin-2.1-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 "dphn/dolphin-2.1-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": "dphn/dolphin-2.1-mistral-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dphn/dolphin-2.1-mistral-7b with Docker Model Runner:
docker model run hf.co/dphn/dolphin-2.1-mistral-7b
It feels fairly restricted
#23 opened over 1 year ago
by
Taylor-eOS
Adding Evaluation Results
#22 opened about 2 years ago
by
leaderboard-pr-bot
Adding `safetensors` variant of this model
#20 opened over 2 years ago
by
SFconvertbot
How to use this model in Langchain and instruct the model ?
#17 opened over 2 years ago
by
Talhaz
LlamaTokenizer missing
2
#14 opened over 2 years ago
by
cosmopax
tokenizer = AutoTokenizer.from_pretrained("ehartford/dolphin-2.1-mistral-7b") results in unk error related to tokens greater than 32000
2
#13 opened over 2 years ago
by
LaferriereJC
I can only get this to work at 8192 context? In Oobabooga. I heard it could do more? Is that false?
2
#12 opened over 2 years ago
by
Goldenblood56
In Oobabooga what Instruction template do I select for Dolphin Mistral 2.1?
1
#11 opened over 2 years ago
by
Goldenblood56
Database Searches and Links
#10 opened over 2 years ago
by
NovaMentor
Did you use flan1m (1M GPT-4 completions) or flan5m (5M GPT-3.5 completions) as dolphin dataset?
1
#9 opened over 2 years ago
by
AlexiaJM
finetuning args
#8 opened over 2 years ago
by
lvkaokao
This LLM can reason through stubborness, censorship and alignment, unlike any other I tested.
🤯👍 8
1
#7 opened over 2 years ago
by deleted
How do I try this out?
4
#6 opened over 2 years ago
by
henke443
Is the dataset public?
2
#4 opened over 2 years ago
by
luiscosio
Some questions and potential suggestions
👍 3
4
#3 opened over 2 years ago
by
polymer