Instructions to use jondurbin/bagel-dpo-34b-v0.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jondurbin/bagel-dpo-34b-v0.5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jondurbin/bagel-dpo-34b-v0.5") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("jondurbin/bagel-dpo-34b-v0.5") model = AutoModelForMultimodalLM.from_pretrained("jondurbin/bagel-dpo-34b-v0.5") 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 jondurbin/bagel-dpo-34b-v0.5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jondurbin/bagel-dpo-34b-v0.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": "jondurbin/bagel-dpo-34b-v0.5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jondurbin/bagel-dpo-34b-v0.5
- SGLang
How to use jondurbin/bagel-dpo-34b-v0.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 "jondurbin/bagel-dpo-34b-v0.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": "jondurbin/bagel-dpo-34b-v0.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 "jondurbin/bagel-dpo-34b-v0.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": "jondurbin/bagel-dpo-34b-v0.5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jondurbin/bagel-dpo-34b-v0.5 with Docker Model Runner:
docker model run hf.co/jondurbin/bagel-dpo-34b-v0.5
Can't wait for Exl2 or GGUF
I'll love to be able to run this bad boy locally, without waiting a minute for every letter to pop :(
Love bagel, that is YOUR bagel, breaded... not as much :D
I found one here: https://huggingface.co/mradermacher/bagel-dpo-34b-v0.5-GGUF. It runs even better than 0.2, and I'm really enjoying your new model. It's very verbose when prompted to be, but sometimes it mixes context when the prompt describes more than one actor. Perhaps I still need to adjust the settings a bit; I don't think it's the model's fault.
Furthermore, I've noticed it output very intriguing narratives from shorter examples, presenting unique ways of expressing the same thing that flow much better in a given story excerpt. I'm really rocking it, I hope it only gets better.
@Undi95 , I encourage you, if I'm not overstepping, to consider this model for mixing with one of yours, such as Noromaid, not just for role-playing but also for its potential in short story telling.
I am working on AWQ now