Instructions to use Yulin-Li/ReBalance with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Yulin-Li/ReBalance with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Yulin-Li/ReBalance")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Yulin-Li/ReBalance", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Yulin-Li/ReBalance with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Yulin-Li/ReBalance" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Yulin-Li/ReBalance", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Yulin-Li/ReBalance
- SGLang
How to use Yulin-Li/ReBalance 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 "Yulin-Li/ReBalance" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Yulin-Li/ReBalance", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Yulin-Li/ReBalance" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Yulin-Li/ReBalance", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Yulin-Li/ReBalance with Docker Model Runner:
docker model run hf.co/Yulin-Li/ReBalance
Add pipeline_tag and library_name metadata
#1
by nielsr HF Staff - opened
Hi! I'm Niels from the Hugging Face community science team.
This PR improves the model card by adding relevant metadata:
pipeline_tag: text-generation: This helps users find your steering vectors when filtering by task on the Hub.library_name: transformers: This indicates the ecosystem the models are compatible with.
I've also added a brief description and the author list to the README to make the artifact more self-contained.
Best,
Niels
Yulin-Li changed pull request status to merged
Hi Niels,
Thank you for your contribution. We have merged your suggested improvements, which indeed enhance the clarity and usability of our model card. We greatly appreciate your attention and support for our work.
Best regards,
Yulin
Yulin-Li deleted the
refs/pr/1 ref