Instructions to use wasertech/assistant-dolphin-2.2.1-mistral-7b-e1-awq with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wasertech/assistant-dolphin-2.2.1-mistral-7b-e1-awq with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="wasertech/assistant-dolphin-2.2.1-mistral-7b-e1-awq") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("wasertech/assistant-dolphin-2.2.1-mistral-7b-e1-awq") model = AutoModelForCausalLM.from_pretrained("wasertech/assistant-dolphin-2.2.1-mistral-7b-e1-awq") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use wasertech/assistant-dolphin-2.2.1-mistral-7b-e1-awq with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wasertech/assistant-dolphin-2.2.1-mistral-7b-e1-awq" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wasertech/assistant-dolphin-2.2.1-mistral-7b-e1-awq", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/wasertech/assistant-dolphin-2.2.1-mistral-7b-e1-awq
- SGLang
How to use wasertech/assistant-dolphin-2.2.1-mistral-7b-e1-awq 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 "wasertech/assistant-dolphin-2.2.1-mistral-7b-e1-awq" \ --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": "wasertech/assistant-dolphin-2.2.1-mistral-7b-e1-awq", "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 "wasertech/assistant-dolphin-2.2.1-mistral-7b-e1-awq" \ --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": "wasertech/assistant-dolphin-2.2.1-mistral-7b-e1-awq", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use wasertech/assistant-dolphin-2.2.1-mistral-7b-e1-awq with Docker Model Runner:
docker model run hf.co/wasertech/assistant-dolphin-2.2.1-mistral-7b-e1-awq
Assistant Dolphin 2.2.1 Mistral 7B (1 epoch) AWQ
This model is a quantized version of Assistant Dolphin 2.2.1 Mistral 7B (1 epoch) using AWQ.
Model description
Assistant Dolphin 2.2.1 Mistral 7B is a fine-tuned version of the cognitivecomputations/dolphin-2.2.1-mistral-7b model on the OneOS dataset for an epoch.
Intended uses & limitations
This model is intended to be used in natural language processing systems to improve text understanding and generation. Specific limitations will depend on the training and evaluation data.
Training and evaluation data
The model was trained on the OneOS dataset.
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 1.41e-05
- train_batch_size: 1
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 2
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 1
Training results
Framework versions
- AutoAWQ 0.1.8
- PEFT 0.7.2.dev0
- Transformers 4.37.0.dev0
- Pytorch 2.1.2+cu121
- Datasets 2.16.2.dev0
- Tokenizers 0.15.0
Example usage
Using transformers and AutoAWQ:
pip install -U transformers autoawq
# Use a pipeline as a high-level helper
from transformers import pipeline
messages = [
{"role": "system", "content": "You are an helpful Assistant."},
{"role": "user", "content": "Who are you?"},
]
pipe = pipeline("text-generation", model="wasertech/assistant-dolphin-2.2.1-mistral-7b-e1-awq", max_length=8096)
pipe(messages)
Outputs
[
{
'generated_text': [
{'role': 'system', 'content': 'You are an helpful Assistant.'},
{'role': 'user', 'content': 'Who are you?'},
{'role': 'assistant', 'content': '<|im_start|> Assistant\nI am an artificial intelligence language model. My purpose is to provide information, advice, and assistance to users. I can perform many tasks, such as answering questions, explaining concepts, generating reports, or summarizing data. I am a tool that can be used to help you learn new things, make decisions, and achieve your goals. I do not have feelings, opinions, or personal experiences; I am simply a helpful resource to share knowledge and support users. What can I do for you?'}
]
}
]
Parsed Assistant answer:
I am an artificial intelligence language model. My purpose is to provide information, advice, and assistance to users. I can perform many tasks, such as answering questions, explaining concepts, generating reports, or summarizing data. I am a tool that can be used to help you learn new things, make decisions, and achieve your goals. I do not have feelings, opinions, or personal experiences; I am simply a helpful resource to share knowledge and support users. What can I do for you?
- Downloads last month
- 7