Instructions to use kubernetes-bad/good-robot-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kubernetes-bad/good-robot-2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kubernetes-bad/good-robot-2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kubernetes-bad/good-robot-2") model = AutoModelForCausalLM.from_pretrained("kubernetes-bad/good-robot-2") 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
- vLLM
How to use kubernetes-bad/good-robot-2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kubernetes-bad/good-robot-2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kubernetes-bad/good-robot-2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kubernetes-bad/good-robot-2
- SGLang
How to use kubernetes-bad/good-robot-2 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 "kubernetes-bad/good-robot-2" \ --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": "kubernetes-bad/good-robot-2", "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 "kubernetes-bad/good-robot-2" \ --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": "kubernetes-bad/good-robot-2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use kubernetes-bad/good-robot-2 with Docker Model Runner:
docker model run hf.co/kubernetes-bad/good-robot-2
Good Robot 2 🤖
The model "Good Robot" had one simple goal in mind: to be a good instruction-following model that doesn't talk like ChatGPT.
Built upon the Mistral 7b 0.2 base, this model aims to provide responses that are as human-like as possible, thanks to some DPO training using the (for now, private) minerva-ai/yes-robots-dpo dataset.
HuggingFaceH4/no-robots was used as the base for generating a custom dataset to create DPO pairs.
It should follow instructions and be generally as smart as a typical Mistral model - just not as soulless and full of GPT slop.
Changes from the original good-robot model:
- Mistral 7b-0.2 base (32k native context, no SWA)
- ChatML prompt format
- Trained using GaLore method
Prompt Format:
ChatML
<|im_start|>system
System message
<|im_start|>user
User message<|im_end|>
<|im_start|>assistant
Credits:
Model made in collaboration with Gryphe.
Training Data:
- HuggingFaceH4/no_robots
- MinervaAI/yes-robots-dpo
- private datasets with common GPTisms
Limitations:
While I did my best to minimize GPTisms, no model is perfect, and there may still be instances where the generated content has GPT's common phrases - I have a suspicion that's due to them being engrained into Mistral model itself.
License:
cc-by-nc-4.0
- Downloads last month
- 7