Text Generation
Transformers
Safetensors
PyTorch
English
mistral
finetuned
quantized
4-bit precision
AWQ
instruct
conversational
text-generation-inference
finetune
chatml
DPO
RLHF
gpt4
synthetic data
distillation
awq
Instructions to use solidrust/bagel-dpo-7b-v0.4-AWQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use solidrust/bagel-dpo-7b-v0.4-AWQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="solidrust/bagel-dpo-7b-v0.4-AWQ") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("solidrust/bagel-dpo-7b-v0.4-AWQ") model = AutoModelForCausalLM.from_pretrained("solidrust/bagel-dpo-7b-v0.4-AWQ", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use solidrust/bagel-dpo-7b-v0.4-AWQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "solidrust/bagel-dpo-7b-v0.4-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": "solidrust/bagel-dpo-7b-v0.4-AWQ", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/solidrust/bagel-dpo-7b-v0.4-AWQ
- SGLang
How to use solidrust/bagel-dpo-7b-v0.4-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 "solidrust/bagel-dpo-7b-v0.4-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": "solidrust/bagel-dpo-7b-v0.4-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 "solidrust/bagel-dpo-7b-v0.4-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": "solidrust/bagel-dpo-7b-v0.4-AWQ", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use solidrust/bagel-dpo-7b-v0.4-AWQ with Docker Model Runner:
docker model run hf.co/solidrust/bagel-dpo-7b-v0.4-AWQ
| { | |
| "<|im_end|>": 32001, | |
| "<|im_start|>": 32000, | |
| "<|special_0|>": 32002, | |
| "<|special_10|>": 32012, | |
| "<|special_11|>": 32013, | |
| "<|special_12|>": 32014, | |
| "<|special_13|>": 32015, | |
| "<|special_14|>": 32016, | |
| "<|special_15|>": 32017, | |
| "<|special_16|>": 32018, | |
| "<|special_17|>": 32019, | |
| "<|special_18|>": 32020, | |
| "<|special_19|>": 32021, | |
| "<|special_1|>": 32003, | |
| "<|special_20|>": 32022, | |
| "<|special_21|>": 32023, | |
| "<|special_22|>": 32024, | |
| "<|special_23|>": 32025, | |
| "<|special_24|>": 32026, | |
| "<|special_25|>": 32027, | |
| "<|special_26|>": 32028, | |
| "<|special_27|>": 32029, | |
| "<|special_28|>": 32030, | |
| "<|special_29|>": 32031, | |
| "<|special_2|>": 32004, | |
| "<|special_30|>": 32032, | |
| "<|special_31|>": 32033, | |
| "<|special_32|>": 32034, | |
| "<|special_33|>": 32035, | |
| "<|special_34|>": 32036, | |
| "<|special_35|>": 32037, | |
| "<|special_36|>": 32038, | |
| "<|special_37|>": 32039, | |
| "<|special_38|>": 32040, | |
| "<|special_39|>": 32041, | |
| "<|special_3|>": 32005, | |
| "<|special_40|>": 32042, | |
| "<|special_41|>": 32043, | |
| "<|special_42|>": 32044, | |
| "<|special_43|>": 32045, | |
| "<|special_44|>": 32046, | |
| "<|special_45|>": 32047, | |
| "<|special_46|>": 32048, | |
| "<|special_47|>": 32049, | |
| "<|special_48|>": 32050, | |
| "<|special_49|>": 32051, | |
| "<|special_4|>": 32006, | |
| "<|special_50|>": 32052, | |
| "<|special_51|>": 32053, | |
| "<|special_52|>": 32054, | |
| "<|special_53|>": 32055, | |
| "<|special_54|>": 32056, | |
| "<|special_55|>": 32057, | |
| "<|special_56|>": 32058, | |
| "<|special_57|>": 32059, | |
| "<|special_58|>": 32060, | |
| "<|special_59|>": 32061, | |
| "<|special_5|>": 32007, | |
| "<|special_60|>": 32062, | |
| "<|special_61|>": 32063, | |
| "<|special_6|>": 32008, | |
| "<|special_7|>": 32009, | |
| "<|special_8|>": 32010, | |
| "<|special_9|>": 32011 | |
| } | |