Upload folder using huggingface_hub
Browse files- README.md +64 -0
- config.json +18 -0
- iql_model_state.pt +3 -0
- label_map.json +7 -0
README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- reinforcement-learning
|
| 4 |
+
- iql
|
| 5 |
+
- fire-rescue
|
| 6 |
+
- emergency-response
|
| 7 |
+
license: mit
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# IQL Fire Rescue Operator Model
|
| 11 |
+
|
| 12 |
+
This model uses Implicit Q-Learning (IQL) to select optimal conversation policies for emergency response scenarios.
|
| 13 |
+
|
| 14 |
+
## Model Description
|
| 15 |
+
|
| 16 |
+
- **Task**: Policy selection for fire rescue emergency conversations
|
| 17 |
+
- **Algorithm**: Implicit Q-Learning (IQL)
|
| 18 |
+
- **Input**: Conversation history (embedded using sentence-transformers)
|
| 19 |
+
- **Output**: Best policy and Q-values for all policies
|
| 20 |
+
|
| 21 |
+
## Policies
|
| 22 |
+
|
| 23 |
+
1. `provide_information` - Share facts, data, risk levels
|
| 24 |
+
2. `offer_assistance` - Provide help, resources, support
|
| 25 |
+
3. `express_urgency` - Convey time pressure, danger
|
| 26 |
+
4. `ask_question` - Gather information from resident
|
| 27 |
+
5. `give_direction` - Provide specific instructions
|
| 28 |
+
6. `acknowledge_concern` - Validate resident's feelings
|
| 29 |
+
7. `build_rapport` - Establish trust and connection
|
| 30 |
+
|
| 31 |
+
## Usage
|
| 32 |
+
|
| 33 |
+
```python
|
| 34 |
+
import requests
|
| 35 |
+
|
| 36 |
+
API_URL = "https://api-inference.huggingface.co/models/YOUR_USERNAME/iql-fire-rescue"
|
| 37 |
+
headers = {"Authorization": f"Bearer YOUR_HF_TOKEN"}
|
| 38 |
+
|
| 39 |
+
def query(payload):
|
| 40 |
+
response = requests.post(API_URL, headers=headers, json=payload)
|
| 41 |
+
return response.json()
|
| 42 |
+
|
| 43 |
+
# Example
|
| 44 |
+
output = query({
|
| 45 |
+
"inputs": "Conversation state here",
|
| 46 |
+
"parameters": {"character": "bob"}
|
| 47 |
+
})
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
## Training Data
|
| 51 |
+
|
| 52 |
+
Trained on emergency response conversations with multiple character profiles.
|
| 53 |
+
|
| 54 |
+
## Citation
|
| 55 |
+
|
| 56 |
+
If you use this model, please cite:
|
| 57 |
+
```
|
| 58 |
+
@misc{iql-fire-rescue,
|
| 59 |
+
title={IQL-based Emergency Response Operator},
|
| 60 |
+
author={Your Name},
|
| 61 |
+
year={2025},
|
| 62 |
+
publisher={Hugging Face}
|
| 63 |
+
}
|
| 64 |
+
```
|
config.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "iql-custom",
|
| 3 |
+
"task": "policy-selection",
|
| 4 |
+
"architecture": {
|
| 5 |
+
"state_dim": 384,
|
| 6 |
+
"num_policies": 7,
|
| 7 |
+
"hidden_dim": 512
|
| 8 |
+
},
|
| 9 |
+
"policies": [
|
| 10 |
+
"provide_information",
|
| 11 |
+
"offer_assistance",
|
| 12 |
+
"express_urgency",
|
| 13 |
+
"ask_question",
|
| 14 |
+
"give_direction",
|
| 15 |
+
"acknowledge_concern",
|
| 16 |
+
"build_rapport"
|
| 17 |
+
]
|
| 18 |
+
}
|
iql_model_state.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e33db4a805612163159bde25cc85eef3187ec7e23f29988cc7dced137944d434
|
| 3 |
+
size 5816581
|
label_map.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bob": 0,
|
| 3 |
+
"lindsay": 1,
|
| 4 |
+
"michelle": 2,
|
| 5 |
+
"niki": 3,
|
| 6 |
+
"ross": 4
|
| 7 |
+
}
|