Instructions to use GainEnergy/ogai-8x7b-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GainEnergy/ogai-8x7b-4bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GainEnergy/ogai-8x7b-4bit") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GainEnergy/ogai-8x7b-4bit") model = AutoModelForCausalLM.from_pretrained("GainEnergy/ogai-8x7b-4bit") 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
- vLLM
How to use GainEnergy/ogai-8x7b-4bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GainEnergy/ogai-8x7b-4bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GainEnergy/ogai-8x7b-4bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GainEnergy/ogai-8x7b-4bit
- SGLang
How to use GainEnergy/ogai-8x7b-4bit 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 "GainEnergy/ogai-8x7b-4bit" \ --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": "GainEnergy/ogai-8x7b-4bit", "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 "GainEnergy/ogai-8x7b-4bit" \ --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": "GainEnergy/ogai-8x7b-4bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use GainEnergy/ogai-8x7b-4bit with Docker Model Runner:
docker model run hf.co/GainEnergy/ogai-8x7b-4bit
OGAI-8x7B-4bit: Oil & Gas AI Model for Drilling Optimization (Quantized)
OGAI-8x7B-4bit is a quantized (4-bit) version of OGAI-8x7B, optimized for deployment in resource-constrained environments while maintaining strong performance for oil and gas drilling engineering tasks.
The model is fine-tuned from Mixtral-8x7B, leveraging a comprehensive dataset of technical literature, engineering workflows, and drilling reports. It is part of GainEnergy's Upstrima AI platform, providing intelligent AI agents, automated workflows, and document-based retrieval-augmented generation (RAG).
🏗 Why Use the 4-bit Model?
- 🚀 Lower VRAM Usage – Runs on consumer GPUs with less than 16GB VRAM.
- 💡 Efficient Inference – Optimized using BitsAndBytes 4-bit NF4 quantization.
- 📚 Long-Context Understanding – Retains up to 32K tokens for technical documents.
- 🔬 Expert-Focused Fine-Tuning – Specifically optimized for drilling operations.
🛠 Using the OGAI-8x7B-4bit Model
1️⃣ Install Required Dependencies
pip install torch transformers accelerate bitsandbytes
2️⃣ Load the Model in 4-bit Mode
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
model_id = "GainEnergy/ogai-8x7b-4bit"
bnb_config = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_compute_dtype="float16")
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_id)
# Load model with quantization config
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
quantization_config=bnb_config
)
# Run inference
prompt = "Explain the impact of mud weight on wellbore stability."
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
📌 Key Capabilities
✅ Drilling Calculations & Well Planning – Computes wellbore stability, casing depth, and mud weight optimization.
✅ Engineering Document Processing (RAG) – Enables document-based AI workflows for drilling reports and operational manuals.
✅ AI-Powered Drilling Workflows – Integrates with Upstrima AI for automated engineering analysis.
✅ Optimized for Low VRAM GPUs – Runs on RTX 4090, A100, and consumer-grade GPUs.
🚀 Use Cases
🔹 Drilling Engineering – Automated analysis of wellbore stability, casing designs, and drilling hydraulics.
🔹 Real-time Optimization – Assists drilling teams in reducing non-productive time (NPT) and improving efficiency.
🔹 AI-Driven Document Retrieval – Enables retrieval-augmented generation (RAG) for drilling compliance and regulatory reporting.
🔹 Seamless Integration – Deployable within Upstrima AI, GainEnergy's intelligent AI platform for the oil and gas industry.
🔗 Resources
- Full Precision Model – FP16 model for full-accuracy inference.
- 8-bit Version – Optimized for medium-memory GPUs.
- GainEnergy AI Platform – Explore AI-powered drilling automation.
📚 Citing OGAI-8x7B-4bit
@article{ogai8x7b4bit2025,
title={OGAI-8x7B-4bit: A Quantized AI Model for Oil & Gas Drilling Engineering},
author={GainEnergy AI Team},
year={2025},
publisher={Hugging Face Models}
}
- Downloads last month
- 11
Model tree for GainEnergy/ogai-8x7b-4bit
Base model
mistralai/Mixtral-8x7B-v0.1Datasets used to train GainEnergy/ogai-8x7b-4bit
GainEnergy/ogai-8x7B
GainEnergy/ogdataset
Evaluation results
- Drilling Calculations Accuracy on GainEnergy Oil & Gas Corpusself-reported92.500
- Engineering Document Retrieval Precision on GainEnergy Oil & Gas Corpusself-reported89.800
- Context Retention on GainEnergy Oil & Gas Corpusself-reportedMedium-High