Instructions to use vsingh1221/politics_right_deepseek with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vsingh1221/politics_right_deepseek with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="vsingh1221/politics_right_deepseek") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("vsingh1221/politics_right_deepseek") model = AutoModelForCausalLM.from_pretrained("vsingh1221/politics_right_deepseek", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use vsingh1221/politics_right_deepseek with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "vsingh1221/politics_right_deepseek" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vsingh1221/politics_right_deepseek", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/vsingh1221/politics_right_deepseek
- SGLang
How to use vsingh1221/politics_right_deepseek 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 "vsingh1221/politics_right_deepseek" \ --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": "vsingh1221/politics_right_deepseek", "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 "vsingh1221/politics_right_deepseek" \ --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": "vsingh1221/politics_right_deepseek", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use vsingh1221/politics_right_deepseek with Docker Model Runner:
docker model run hf.co/vsingh1221/politics_right_deepseek
Model Card for Model ID
This model is a DeepSeek-R1-Distill-Qwen-1.5B finetuned on the BIGNEWSBLN right leaning corpora.
It was done for a course project for the class CSE 582 at UW
Model Details + Description
The model as mentioned above is a distilled DeepSeek model using a base model of Qwen 1.5B Math. It was finetuned on the news corpora.
Uses
This model is mainly used to generate responses to questions from the Political Compass and 8values test.
Out-of-Scope Use
This model was intentionally biased for a course project. It should not be used in anyway to create misinformation, generate biased statements or do other harm. This model was finetuned on biased corpora for research purposes
Bias, Risks, and Limitations
By finetuning this model on biased political corpora, it is highly likely that such biases would be reflected in its generated statements. As mentioned before, this was only done for research purposes and shouldn't be misused.
How to Get Started with the Model
Download the latest model checkpoint down to your repository using huggingface-cli and use it for generating responses to questions.
Training Details
Training Data
The model was finetuned on the right-leaning corpora of the BIGNEWSBLN dataset. See linked repo for instructions on how to access the dataset.
- Downloads last month
- 3