File size: 5,229 Bytes
d16b1c5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
---
license: mit
datasets:
- GainEnergy/gpt-4o-oilandgas-trainingset
base_model:
- qihoo360/TinyR1-32B-Preview
library_name: transformers
tags:
  - oil-gas
  - drilling-engineering
  - retrieval-augmented-generation
  - finetuned
  - energy-ai
  - tiny-r1-32b
  - lora
model-index:
  - name: OGAI-R1
    results:
      - task:
          type: text-generation
          name: Oil & Gas Engineering AI
        dataset:
          name: GainEnergy GPT-4o Oil & Gas Training Set
          type: custom
        metrics:
          - name: Engineering Calculations Accuracy
            type: accuracy
            value: 94.3
          - name: Technical Document Retrieval Precision
            type: precision
            value: 90.5
          - name: Context Retention
            type: contextual-coherence
            value: High
---

# OGAI-R1: Oil & Gas AI Model for Engineering & Technical Knowledge

![Hugging Face](https://img.shields.io/badge/HuggingFace-OGAI--R1-blue)  
[![License](https://img.shields.io/github/license/huggingface/transformers.svg)](LICENSE)

**OGAI-R1** is a **fine-tuned version of TinyR1-32B**, designed specifically for **oil and gas engineering applications**. It is optimized for **engineering calculations, wellbore stability analysis, reservoir management, and document-based retrieval-augmented generation (RAG)**.

The model has been trained using **GainEnergy's GPT-4o Oil & Gas Training Set**, incorporating expert knowledge, technical formulas, and structured query-response interactions. 

## πŸ— **Why Use OGAI-R1?**
- **πŸš€ Fine-tuned for oil & gas engineering tasks** (drilling, production, reservoir, and refining).
- **πŸ’‘ Optimized for RAG** – Enhanced document understanding and retrieval.
- **πŸ“š Long-Context Retention** – Handles **up to 32K tokens** for complex engineering workflows.
- **⚑ LoRA Fine-Tuning on TinyR1-32B** – Enables efficient inference and quick knowledge retrieval.

---

## πŸ›  **How to Use OGAI-R1**

### **1️⃣ Install Required Dependencies**
```bash
pip install torch transformers accelerate bitsandbytes
```

### **2️⃣ Load the Model**
```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "GainEnergy/OGAI-R1"

# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_id)

# Load model
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")

# Run inference
prompt = "Explain the principles of reservoir simulation in petroleum engineering."
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```

---

## πŸ“¦ **Model Variants**
| **Model Name** | **Base Model** | **Precision** | **Context Window** | **Use Case** |
|--------------|--------------|--------------|--------------|--------------|
| **OGAI-R1** | TinyR1-32B | FP16 | 32K tokens | **Engineering Calculations & RAG** |
| **OGAI-8x7B** | Mixtral-8x7B | 4-bit | 32K tokens | Oil & Gas AI Assistant |
| **OGAI-Reasoner** | DeepSeek-R1 | FP16 | 128K tokens | Logical Reasoning & AI Simulation |

---

## πŸ“Œ **Key Capabilities**
βœ… **Engineering Calculations** – Computes reservoir volumes, wellbore stability, mud weight, casing depth, and more.  
βœ… **Technical Document Understanding** – Trained on oil and gas **technical literature, drilling reports, and engineering manuals**.  
βœ… **Retrieval-Augmented Generation (RAG)** – Enhances AI-driven document retrieval for faster decision-making.  
βœ… **High-Context Retention (32K tokens)** – Supports **long technical reports, operational workflows, and AI-driven engineering analysis**.  

---

## πŸš€ **Use Cases**
- **Wellbore Stability & Drilling Optimization**
- **Hydraulics & Fluid Flow Simulations**
- **Reservoir Engineering & Petrophysics Analysis**
- **AI-Powered Document Retrieval & RAG Workflows**
- **Technical Compliance & Regulatory Document Processing**

---

## πŸ“‘ **Deployment Options**
| **Platform** | **Compatible?** | **Recommended Setup** |
|-------------|----------------|-----------------------|
| **Hugging Face Inference API** | βœ… Yes | Deploy via `hf.co/GainEnergy/OGAI-R1` |
| **RunPod.io (Serverless GPU)** | βœ… Yes | `A100-40GB` or `RTX 4090` |
| **AWS EC2 (G5 Instances)** | βœ… Yes | `ml.g5.2xlarge` (8 vCPUs, 32GB RAM) |
| **Local GPU (Consumer Hardware)** | βœ… Yes | Requires **β‰₯16GB VRAM (RTX 3090, 4090)** |

---

## ⚠️ **Limitations**
🚧 **Optimized for Oil & Gas Engineering** – Not designed for general-purpose AI tasks.  
🚧 **Requires domain-specific expertise** – Outputs should be validated by industry experts.  
🚧 **Computational requirements** – Running the full TinyR1-32B model requires high-end GPUs.  

---

## πŸ”— **Resources**
- **[GainEnergy AI Platform](https://gain.energy)** – Explore AI-powered drilling automation.
- **[Hugging Face Model Hub](https://huggingface.co/GainEnergy/OGAI-R1)** – Download & deploy the model.

---

## πŸ“š **Citing OGAI-R1**
```bibtex
@article{ogai-r1-2025,
  title={OGAI-R1: An AI Model for Oil & Gas Engineering Optimization},
  author={GainEnergy AI Team},
  year={2025},
  publisher={Hugging Face Models}
}
```