Instructions to use PiyushWithPant/Llama-Saint-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PiyushWithPant/Llama-Saint-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="PiyushWithPant/Llama-Saint-3B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("PiyushWithPant/Llama-Saint-3B") model = AutoModelForCausalLM.from_pretrained("PiyushWithPant/Llama-Saint-3B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use PiyushWithPant/Llama-Saint-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PiyushWithPant/Llama-Saint-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PiyushWithPant/Llama-Saint-3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/PiyushWithPant/Llama-Saint-3B
- SGLang
How to use PiyushWithPant/Llama-Saint-3B 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 "PiyushWithPant/Llama-Saint-3B" \ --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": "PiyushWithPant/Llama-Saint-3B", "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 "PiyushWithPant/Llama-Saint-3B" \ --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": "PiyushWithPant/Llama-Saint-3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use PiyushWithPant/Llama-Saint-3B with Docker Model Runner:
docker model run hf.co/PiyushWithPant/Llama-Saint-3B
π Llama-Saint-3B
Llama-Saint-3B is a safety-aligned language model derived from Meta Llama 3.2 and trained using RLHF-style preference learning on the Manthan-RLHF dataset.
π€ Dataset: Manthan-RLHF
π Usage
import torch
from transformers import AutoTokenizer,AutoModelForCausalLM
model_id = "PiyushWithPant/Llama-Saint-3B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained( model_id, device_map="auto")
prompt = "\nHUMAN: Explain how solar energy works.\n\nASSISTANT:"
inputs = tokenizer(prompt,return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=256, pad_token_id = tokenizer.eos_token_id)
print(tokenizer.decode(output[0],skip_special_tokens=True))
π― Intended Use
Llama-Saint is intended for research and general-purpose language-model use, particularly for experiments involving:
- RLHF and preference learning
- LLM alignment and safety
- Safety-oriented generation
- Alignment evaluation and research
This is a research model and should not be assumed to be perfectly safe, factual, or reliable in high-stakes applications.
π Training
The model was trained on Manthan-RLHF using:
- Supervised Fine-Tuning (SFT)
- Direct Preference Optimization (DPO)
The resulting model represents the safety-aligned Llama-Saint model family.
β οΈ Limitations
The model may generate incorrect, biased, unsafe, or otherwise undesirable outputs. Safety alignment does not guarantee safe behavior under all prompts or adversarial conditions.
π License
This model is derived from meta-llama/Llama-3.2-3B and is distributed subject to the Llama 3.2 Community License and applicable Acceptable Use Policy.
Built with Llama.
π€ Author
Piyush Pant
π€ Hugging Face: PiyushWithPant
π Citation
@misc{pant2026llamasaint,
author = {Pant, Piyush},
title = {Llama-Saint-3B},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/PiyushWithPant/Llama-Saint-3B}
}
- Downloads last month
- -
Model tree for PiyushWithPant/Llama-Saint-3B
Base model
meta-llama/Llama-3.2-3B