Instructions to use Haleshot/Mathmate-7B-DELLA-ORPO-C with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Haleshot/Mathmate-7B-DELLA-ORPO-C with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Haleshot/Mathmate-7B-DELLA-ORPO-C") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Haleshot/Mathmate-7B-DELLA-ORPO-C", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Haleshot/Mathmate-7B-DELLA-ORPO-C with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Haleshot/Mathmate-7B-DELLA-ORPO-C" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Haleshot/Mathmate-7B-DELLA-ORPO-C", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Haleshot/Mathmate-7B-DELLA-ORPO-C
- SGLang
How to use Haleshot/Mathmate-7B-DELLA-ORPO-C 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 "Haleshot/Mathmate-7B-DELLA-ORPO-C" \ --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": "Haleshot/Mathmate-7B-DELLA-ORPO-C", "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 "Haleshot/Mathmate-7B-DELLA-ORPO-C" \ --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": "Haleshot/Mathmate-7B-DELLA-ORPO-C", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Haleshot/Mathmate-7B-DELLA-ORPO-C with Docker Model Runner:
docker model run hf.co/Haleshot/Mathmate-7B-DELLA-ORPO-C
Mathmate-7B-DELLA-ORPO-C
Mathmate-7B-DELLA-ORPO-C is a LoRA adapter for Haleshot/Mathmate-7B-DELLA-ORPO, finetuned to improve performance on everyday conversations.
Model Details
- Base Model: Haleshot/Mathmate-7B-DELLA
- Training Dataset: HuggingFaceTB/everyday-conversations-llama3.1-2k
Dataset
The model was finetuned on the HuggingFaceTB/everyday-conversations-llama3.1-2k dataset, which focuses on everyday conversations and small talk.
Usage
To use this LoRA adapter, you need to load both the base model and the adapter. Here's an example:
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel, PeftConfig
import torch
base_model_name = "Haleshot/Mathmate-7B-DELLA"
adapter_name = "Haleshot/Mathmate-7B-DELLA-ORPO-C"
base_model = AutoModelForCausalLM.from_pretrained(base_model_name, torch_dtype=torch.float16, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
model = PeftModel.from_pretrained(base_model, adapter_name)
def generate_response(prompt, max_length=512):
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_length=max_length, num_return_sequences=1, do_sample=True, temperature=0.7)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
prompt = "Let's have a casual conversation about the weather today."
response = generate_response(prompt)
print(response)
Acknowledgements
Thanks to the HuggingFaceTB team for providing the everyday conversations dataset used in this finetuning process.
Model tree for Haleshot/Mathmate-7B-DELLA-ORPO-C
Base model
Haleshot/Mathmate-7B-DELLA