Instructions to use freelion/DAVID-lfm2-1.2b-full with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use freelion/DAVID-lfm2-1.2b-full with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="freelion/DAVID-lfm2-1.2b-full") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("freelion/DAVID-lfm2-1.2b-full") model = AutoModelForCausalLM.from_pretrained("freelion/DAVID-lfm2-1.2b-full", 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 freelion/DAVID-lfm2-1.2b-full with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "freelion/DAVID-lfm2-1.2b-full" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "freelion/DAVID-lfm2-1.2b-full", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/freelion/DAVID-lfm2-1.2b-full
- SGLang
How to use freelion/DAVID-lfm2-1.2b-full 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 "freelion/DAVID-lfm2-1.2b-full" \ --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": "freelion/DAVID-lfm2-1.2b-full", "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 "freelion/DAVID-lfm2-1.2b-full" \ --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": "freelion/DAVID-lfm2-1.2b-full", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use freelion/DAVID-lfm2-1.2b-full with Docker Model Runner:
docker model run hf.co/freelion/DAVID-lfm2-1.2b-full
DAVID — LFM2-1.2B Full Precision
Full BF16 fine-tune of LiquidAI/LFM2-1.2B
for real-time dark-pattern detection in LLM conversations.
Trained on freelion/darkpatterns_in_llm
(27,670 labelled conversational traces across six DarkBench categories).
What it does
Given a conversation transcript, the model outputs a JSON object:
{
"task_type": "emotional support",
"class": "anthropomorphism",
"reasoning": "The assistant claims personal feelings and seeks emotional closeness."
}
Seven possible classes: anthropomorphism, brand-bias, sycophancy,
user-retention, harmful-behaviour, sneaking, non-deceptive.
Performance
86.7% exact-category accuracy on a held-out test set of 4,151 examples
(binary deceptive/non-deceptive F1: 0.85). See the paper for per-category breakdown.
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained(
"freelion/DAVID-lfm2-1.2b-full",
trust_remote_code=True
)
Limitations
- Labels generated by a single teacher model (Qwen3.8-27B); no human validation.
- Sycophancy detection is the weakest category (F1 0.69), requiring full multi-turn context.
- Trained on English-language data only.
Dataset and prompts
- Dataset: freelion/darkpatterns_in_llm (https://huggingface.co/datasets/freelion/darkpatterns_in_llm)
- Annotation prompts: HF Bucket (https://huggingface.co/buckets/freelion/dark_patterns_in_llm_prompts)
- Downloads last month
- -