Text Generation
Transformers
PyTorch
TensorBoard
Safetensors
English
mistral
conversational
text-generation-inference
Instructions to use neovalle/H4rmoniousBreezeDPO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use neovalle/H4rmoniousBreezeDPO with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="neovalle/H4rmoniousBreezeDPO") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("neovalle/H4rmoniousBreezeDPO") model = AutoModelForCausalLM.from_pretrained("neovalle/H4rmoniousBreezeDPO", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use neovalle/H4rmoniousBreezeDPO with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "neovalle/H4rmoniousBreezeDPO" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "neovalle/H4rmoniousBreezeDPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/neovalle/H4rmoniousBreezeDPO
- SGLang
How to use neovalle/H4rmoniousBreezeDPO 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 "neovalle/H4rmoniousBreezeDPO" \ --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": "neovalle/H4rmoniousBreezeDPO", "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 "neovalle/H4rmoniousBreezeDPO" \ --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": "neovalle/H4rmoniousBreezeDPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use neovalle/H4rmoniousBreezeDPO with Docker Model Runner:
docker model run hf.co/neovalle/H4rmoniousBreezeDPO
Download training_params.json from neovalle/H4rmoniousBreezeDPO: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/neovalle/H4rmoniousBreezeDPO/resolve/main/training_params.json
- Command line
-
hf download hf://neovalle/H4rmoniousBreezeDPO/training_params.json
-
curl -L -o training_params.json https://huggingface.co/neovalle/H4rmoniousBreezeDPO/resolve/main/training_params.json
1.09 kB
| {"model": "HuggingFaceH4/zephyr-7b-beta", "data_path": "neovalle/H4rmony", "project_name": "H4rmoniousBreezeDPO", "train_split": "train", "valid_split": null, "text_column": "BetterCompletion", "rejected_text_column": "WorseCompletion", "lr": 2e-05, "epochs": 4, "batch_size": 8, "warmup_ratio": 0.1, "gradient_accumulation": 1, "optimizer": "adamw_torch", "scheduler": "linear", "weight_decay": 0.0, "max_grad_norm": 1.0, "seed": 42, "add_eos_token": false, "block_size": 512, "use_peft": true, "lora_r": 16, "lora_alpha": 32, "lora_dropout": 0.05, "logging_steps": -1, "evaluation_strategy": "epoch", "save_total_limit": 1, "save_strategy": "epoch", "auto_find_batch_size": false, "fp16": true, "push_to_hub": true, "use_int8": false, "model_max_length": 1024, "repo_id": "neovalle/H4rmoniousBreezeDPO", "use_int4": true, "trainer": "dpo", "target_modules": "q_proj,v_proj", "merge_adapter": true, "username": "neovalle", "use_flash_attention_2": false, "log": "tensorboard", "disable_gradient_checkpointing": true, "model_ref": null, "dpo_beta": 0.1, "prompt_text_column": "Prompt"} |