WillJeynes/LLMsForDisinformationAnalysis-Dataset
Viewer • Updated • 1.91k • 4
How to use WillJeynes/LLMsForDisinformationPrediction with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("TinyLlama/TinyLlama-1.1B-Chat-v1.0")
model = PeftModel.from_pretrained(base_model, "WillJeynes/LLMsForDisinformationPrediction")How to use WillJeynes/LLMsForDisinformationPrediction with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="WillJeynes/LLMsForDisinformationPrediction")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("WillJeynes/LLMsForDisinformationPrediction", dtype="auto")How to use WillJeynes/LLMsForDisinformationPrediction with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "WillJeynes/LLMsForDisinformationPrediction"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "WillJeynes/LLMsForDisinformationPrediction",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/WillJeynes/LLMsForDisinformationPrediction
How to use WillJeynes/LLMsForDisinformationPrediction with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "WillJeynes/LLMsForDisinformationPrediction" \
--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": "WillJeynes/LLMsForDisinformationPrediction",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "WillJeynes/LLMsForDisinformationPrediction" \
--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": "WillJeynes/LLMsForDisinformationPrediction",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use WillJeynes/LLMsForDisinformationPrediction with Docker Model Runner:
docker model run hf.co/WillJeynes/LLMsForDisinformationPrediction
Model trained on https://huggingface.co/datasets/WillJeynes/LLMsForDisinformationAnalysis-Dataset
Generated events were linked to original disinformation claim in a QA setup, with the intention of improving ability to guess possible claims that could arise from current events
Code available https://github.com/WillJeynes/LLMsForDisinformationPrediction/
Base model
TinyLlama/TinyLlama-1.1B-Chat-v1.0