Instructions to use newsmediabias/llama2-7b-debiaser-it with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use newsmediabias/llama2-7b-debiaser-it with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="newsmediabias/llama2-7b-debiaser-it")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("newsmediabias/llama2-7b-debiaser-it") model = AutoModelForCausalLM.from_pretrained("newsmediabias/llama2-7b-debiaser-it", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use newsmediabias/llama2-7b-debiaser-it with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "newsmediabias/llama2-7b-debiaser-it" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "newsmediabias/llama2-7b-debiaser-it", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/newsmediabias/llama2-7b-debiaser-it
- SGLang
How to use newsmediabias/llama2-7b-debiaser-it 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 "newsmediabias/llama2-7b-debiaser-it" \ --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": "newsmediabias/llama2-7b-debiaser-it", "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 "newsmediabias/llama2-7b-debiaser-it" \ --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": "newsmediabias/llama2-7b-debiaser-it", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use newsmediabias/llama2-7b-debiaser-it with Docker Model Runner:
docker model run hf.co/newsmediabias/llama2-7b-debiaser-it
- Xet hash:
- 45175f970a16c5041ea4291cd333334e61a53a692676561c69618886085133ae
- Size of remote file:
- 4.94 GB
- SHA256:
- 8cd00b0eea74b3b2bdf93ddd8b1b7fde8dd7c7288f1d4105a13b36c056d95ab2
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.