EryriLabs commited on
Commit
05b5fd8
·
verified ·
1 Parent(s): b5c0e42

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +164 -3
README.md CHANGED
@@ -1,3 +1,164 @@
1
- ---
2
- license: cc-by-nc-nd-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ language:
4
+ - en
5
+ base_model: unsloth/gpt-oss-20b
6
+ tags:
7
+ - police
8
+ - interview
9
+ - training
10
+ - roleplay
11
+ - PEACE-framework
12
+ - UK-law
13
+ - domain-adapted
14
+ - LoRA
15
+ - MoE
16
+ pipeline_tag: text-generation
17
+ ---
18
+
19
+ # PIT - Police Interview Trainer
20
+
21
+ > **FOR TRAINING AND RESEARCH PURPOSES ONLY.**
22
+ > Not for operational policing, legal advice, or use as evidence in any proceedings.
23
+ > The creator accepts no responsibility or liability for any use or misuse of this model.
24
+ > Model outputs may be inaccurate or incomplete.
25
+
26
+ ## Model Description
27
+
28
+ PIT (Police Interview Trainer) is a domain-adapted language model for UK police interview roleplay training. It simulates realistic suspect behaviour across multiple scenario types, enabling trainee officers to practise the PEACE interview framework in a safe environment.
29
+
30
+ **Base model:** [unsloth/gpt-oss-20b](https://huggingface.co/unsloth/gpt-oss-20b) — a 21B parameter Mixture-of-Experts model with 3.6B active parameters per forward pass.
31
+
32
+ ## Training Pipeline
33
+
34
+ The model was created through a three-stage training pipeline:
35
+
36
+ ### 1. Continued Pre-Training (CPT) — UK Criminal Law
37
+ - **Corpus:** ~10.7 million tokens of UK criminal law material
38
+ - **Coverage:** Legislation, case law, PACE codes, CPS guidance, sentencing guidelines
39
+ - **Adapter:** LoRA r=64, 3 epochs, 1,971 steps
40
+
41
+ ### 2. Continued Pre-Training (CPT) — Police Interview Technique
42
+ - **Corpus:** ~53,000 tokens of PIP Level 1 interview training material
43
+ - **Coverage:** PEACE framework, questioning techniques, suspect management, vulnerable persons
44
+ - **Adapter:** LoRA r=32, 10 epochs, 80 steps
45
+ - **Stacked on:** Stage 1 adapter
46
+
47
+ ### 3. Supervised Fine-Tuning (SFT) — Interview Roleplay
48
+ - **Dataset:** 523 examples across 6 interaction modes
49
+ - **Adapter:** LoRA r=32, 3 epochs, 198 steps
50
+ - **Stacked on:** Stage 1 + Stage 2 adapters
51
+
52
+ #### SFT Modes
53
+ | Mode | Examples | Description |
54
+ |------|----------|-------------|
55
+ | Suspect roleplay | 200 | In-character suspect responses (cooperative, deceptive, no-comment) |
56
+ | Assessment | 120 | Post-interview PIP Level 1 assessment feedback |
57
+ | PEACE knowledge | 80 | Direct Q&A about PEACE framework and interview law |
58
+ | Witness roleplay | 60 | In-character witness responses |
59
+ | Scenario presentation | 33 | Generating interview briefing scenarios |
60
+ | Special procedures | 30 | Handling vulnerable suspects, appropriate adults, mental health |
61
+
62
+ ## Quick Start with Docker
63
+
64
+ ```bash
65
+ git clone https://huggingface.co/EryriLabs/PIT
66
+ cd PIT
67
+ # Or clone the application repo which includes the Docker setup
68
+ ```
69
+
70
+ ### Using the full application (recommended)
71
+
72
+ The PIT application includes a web interface with scenario selection, interview simulation, transcript recording, and automated assessment.
73
+
74
+ ```bash
75
+ cd pit-app
76
+ docker compose up
77
+ ```
78
+
79
+ Then open **http://localhost:3000**.
80
+
81
+ **Requirements:**
82
+ - Docker with NVIDIA Container Toolkit
83
+ - GPU with 48GB+ VRAM (or 2x 24GB GPUs)
84
+ - ~48GB disk space
85
+
86
+ ### Using with Transformers directly
87
+
88
+ ```python
89
+ from transformers import AutoModelForCausalLM, AutoTokenizer
90
+ import torch
91
+
92
+ model = AutoModelForCausalLM.from_pretrained(
93
+ "EryriLabs/PIT",
94
+ torch_dtype=torch.bfloat16,
95
+ device_map="auto",
96
+ trust_remote_code=True,
97
+ )
98
+ tokenizer = AutoTokenizer.from_pretrained("EryriLabs/PIT", trust_remote_code=True)
99
+
100
+ messages = [
101
+ {"role": "system", "content": "You are PIT (Police Interview Trainer), simulating a suspect in a police interview training exercise.\n\nYOUR CHARACTER: Tyler Bennett, 23 years old, male.\nBEHAVIOUR: cooperative\n\nINSTRUCTIONS:\n- Stay in character throughout\n- Use natural everyday speech\n- Keep responses to 1-3 sentences"},
102
+ {"role": "user", "content": "I am cautioning you. You do not have to say anything. But it may harm your defence if you do not mention when questioned something which you later rely on in court. Anything you do say may be given in evidence. Do you understand the caution?"}
103
+ ]
104
+
105
+ input_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
106
+ inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
107
+
108
+ with torch.no_grad():
109
+ outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.7, do_sample=True)
110
+
111
+ response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
112
+ print(response)
113
+ ```
114
+
115
+ ## Intended Use
116
+
117
+ - Police interview training and education
118
+ - Academic research into interview techniques
119
+ - Roleplay simulation for PEACE framework practice
120
+ - PIP Level 1 assessment preparation
121
+
122
+ ## Out of Scope
123
+
124
+ - Operational policing decisions
125
+ - Legal advice or guidance
126
+ - Evidence in any legal proceedings
127
+ - Replacement for human interview training supervision
128
+ - Any commercial use without explicit permission
129
+
130
+ ## Technical Details
131
+
132
+ - **Architecture:** Mixture-of-Experts (MoE), 21B total / 3.6B active parameters
133
+ - **Precision:** bfloat16
134
+ - **Training method:** QLoRA (4-bit quantised base, 16-bit adapters)
135
+ - **Hardware:** 2x NVIDIA RTX 3090 (24GB each)
136
+ - **Framework:** Unsloth + HuggingFace Transformers
137
+
138
+ ## Disclaimer
139
+
140
+ **THIS MODEL IS PROVIDED FOR TRAINING AND RESEARCH PURPOSES ONLY.**
141
+
142
+ This model is not intended for, and should not be used in, operational policing, legal proceedings, or any context where its outputs could affect real individuals or cases. The model may generate inaccurate, incomplete, or inappropriate content. The creator accepts no responsibility or liability whatsoever for any use or misuse of this model or its outputs.
143
+
144
+ Users are solely responsible for ensuring their use complies with all applicable laws and regulations.
145
+
146
+ ## License
147
+
148
+ CC-BY-NC-4.0 (Creative Commons Attribution-NonCommercial 4.0 International)
149
+
150
+ ## Citation
151
+
152
+ ```bibtex
153
+ @misc{eryrilabs2026pit,
154
+ title={PIT: Police Interview Trainer},
155
+ author={EryriLabs},
156
+ year={2026},
157
+ publisher={HuggingFace},
158
+ url={https://huggingface.co/EryriLabs/PIT}
159
+ }
160
+ ```
161
+
162
+ ## Contact
163
+
164
+ - HuggingFace: [EryriLabs](https://huggingface.co/EryriLabs)