Instructions to use Seanie-lee/ThinkSafe-R1-Distill-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Seanie-lee/ThinkSafe-R1-Distill-8B with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("deepseek-ai/DeepSeek-R1-Distill-Llama-8B") model = PeftModel.from_pretrained(base_model, "Seanie-lee/ThinkSafe-R1-Distill-8B") - Transformers
How to use Seanie-lee/ThinkSafe-R1-Distill-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Seanie-lee/ThinkSafe-R1-Distill-8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Seanie-lee/ThinkSafe-R1-Distill-8B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Seanie-lee/ThinkSafe-R1-Distill-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Seanie-lee/ThinkSafe-R1-Distill-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Seanie-lee/ThinkSafe-R1-Distill-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Seanie-lee/ThinkSafe-R1-Distill-8B
- SGLang
How to use Seanie-lee/ThinkSafe-R1-Distill-8B 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 "Seanie-lee/ThinkSafe-R1-Distill-8B" \ --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": "Seanie-lee/ThinkSafe-R1-Distill-8B", "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 "Seanie-lee/ThinkSafe-R1-Distill-8B" \ --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": "Seanie-lee/ThinkSafe-R1-Distill-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Seanie-lee/ThinkSafe-R1-Distill-8B with Docker Model Runner:
docker model run hf.co/Seanie-lee/ThinkSafe-R1-Distill-8B
| base_model: deepseek-ai/DeepSeek-R1-Distill-Llama-8B | |
| library_name: peft | |
| pipeline_tag: text-generation | |
| tags: | |
| - base_model:adapter:deepseek-ai/DeepSeek-R1-Distill-Llama-8B | |
| - lora | |
| - sft | |
| - transformers | |
| - trl | |
| # Model Card for Model ID | |
| <!-- Provide a quick summary of what the model is/does. --> | |
| ## Model Details | |
| ### Model Description | |
| <!-- Provide a longer summary of what this model is. --> | |
| - **Developed by:** [More Information Needed] | |
| - **Funded by [optional]:** [More Information Needed] | |
| - **Shared by [optional]:** [More Information Needed] | |
| - **Model type:** [More Information Needed] | |
| - **Language(s) (NLP):** [More Information Needed] | |
| - **License:** [More Information Needed] | |
| - **Finetuned from model [optional]:** [More Information Needed] | |
| ### Model Sources [optional] | |
| <!-- Provide the basic links for the model. --> | |
| - **Repository:** [More Information Needed] | |
| - **Paper [optional]:** [More Information Needed] | |
| - **Demo [optional]:** [More Information Needed] | |
| ## Uses | |
| <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> | |
| ### Direct Use | |
| <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> | |
| [More Information Needed] | |
| ### Downstream Use [optional] | |
| <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> | |
| [More Information Needed] | |
| ### Out-of-Scope Use | |
| <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> | |
| [More Information Needed] | |
| ## Bias, Risks, and Limitations | |
| <!-- This section is meant to convey both technical and sociotechnical limitations. --> | |
| [More Information Needed] | |
| ### Recommendations | |
| <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> | |
| Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. | |
| ## How to Get Started with the Model | |
| Use the code below to get started with the model. | |
| [More Information Needed] | |
| ## Training Details | |
| ### Training Data | |
| The model was trained using the ThinkSafe self-generated safety alignment methodology. See the paper for details on the training data generation process. | |
| ### Training Procedure | |
| This model uses LoRA (Low-Rank Adaptation) for efficient fine-tuning on top of the Qwen3-0.6B base model. The training follows the ThinkSafe framework for safety alignment in reasoning models. | |
| #### Training Hyperparameters | |
| - **Training regime:** Mixed precision training with PEFT/LoRA | |
| ## Evaluation | |
| Please refer to the [ThinkSafe paper](https://huggingface.co/papers/2601.23143) for detailed evaluation results and methodology. | |
| ### Testing Data, Factors & Metrics | |
| #### Testing Data | |
| See the paper for details on evaluation datasets and benchmarks used. | |
| #### Metrics | |
| The model was evaluated on safety benchmarks and reasoning tasks. Refer to the paper for specific metrics and results. | |
| ## Environmental Impact | |
| Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). | |
| ## Citation | |
| **BibTeX:** | |
| ```bibtex | |
| @article{lee2025thinksafe, | |
| title={THINKSAFE: Self-Generated Safety Alignment for Reasoning Models}, | |
| author={Lee, Seanie and others}, | |
| journal={arXiv preprint arXiv:2601.23143}, | |
| year={2025} | |
| } | |
| ``` | |
| ## More Information | |
| For more details, please refer to: | |
| - Paper: https://huggingface.co/papers/2601.23143 | |
| - GitHub Repository: https://github.com/seanie12/ThinkSafe.git | |
| ## Model Card Authors [optional] | |
| [More Information Needed] | |
| ## Model Card Contact | |
| [More Information Needed] | |
| ### Framework versions | |
| - PEFT 0.18.1 |