Instructions to use asoba/EnergyAnalyst-v0.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use asoba/EnergyAnalyst-v0.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="asoba/EnergyAnalyst-v0.1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("asoba/EnergyAnalyst-v0.1") model = AutoModelForCausalLM.from_pretrained("asoba/EnergyAnalyst-v0.1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use asoba/EnergyAnalyst-v0.1 with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf asoba/EnergyAnalyst-v0.1:Q4_K_M # Run inference directly in the terminal: llama cli -hf asoba/EnergyAnalyst-v0.1:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf asoba/EnergyAnalyst-v0.1:Q4_K_M # Run inference directly in the terminal: llama cli -hf asoba/EnergyAnalyst-v0.1:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf asoba/EnergyAnalyst-v0.1:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf asoba/EnergyAnalyst-v0.1:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf asoba/EnergyAnalyst-v0.1:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf asoba/EnergyAnalyst-v0.1:Q4_K_M
Use Docker
docker model run hf.co/asoba/EnergyAnalyst-v0.1:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use asoba/EnergyAnalyst-v0.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "asoba/EnergyAnalyst-v0.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "asoba/EnergyAnalyst-v0.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/asoba/EnergyAnalyst-v0.1:Q4_K_M
- SGLang
How to use asoba/EnergyAnalyst-v0.1 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 "asoba/EnergyAnalyst-v0.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "asoba/EnergyAnalyst-v0.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "asoba/EnergyAnalyst-v0.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "asoba/EnergyAnalyst-v0.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use asoba/EnergyAnalyst-v0.1 with Ollama:
ollama run hf.co/asoba/EnergyAnalyst-v0.1:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use asoba/EnergyAnalyst-v0.1 with Docker Model Runner:
docker model run hf.co/asoba/EnergyAnalyst-v0.1:Q4_K_M
- Lemonade
How to use asoba/EnergyAnalyst-v0.1 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull asoba/EnergyAnalyst-v0.1:Q4_K_M
Run and chat with the model
lemonade run user.EnergyAnalyst-v0.1-Q4_K_M
List all available models
lemonade list
- Atomic Chat
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="asoba/EnergyAnalyst-v0.1")# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("asoba/EnergyAnalyst-v0.1")
model = AutoModelForCausalLM.from_pretrained("asoba/EnergyAnalyst-v0.1", device_map="auto")EnergyAnalyst-v0.1
A Mistral-7B-v0.3 model fine-tuned for energy policy and regulatory compliance analysis.
Model Description
This model specializes in:
- Identifying regulatory compliance requirements
- Spotting arbitrage opportunities in energy regulations
- Analyzing policy gaps and inconsistencies
- Generating actionable compliance strategies
Training Process
Three-stage training pipeline:
- Stage 1: SFT on Dolly-15k for general instruction following
- Stage 2A: Continued pre-training on 50k energy policy documents
- Stage 2B: Fine-tuning on 7k domain-specific Q&A pairs
Usage
Local RAG Setup (Recommended)
This repository includes a complete RAG (Retrieval-Augmented Generation) system for local testing:
Quick Start:
- Interactive Chat:
python chat.py- Chat directly with EnergyAnalyst - API Server:
python api/server.py- HTTP API for integration with other repos/services
See RAG Guide for complete setup instructions.
Direct Model Usage (Transformers)
For direct model usage without RAG:
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("asoba/PolicyAnalyst-v0.1")
tokenizer = AutoTokenizer.from_pretrained("asoba/PolicyAnalyst-v0.1")
prompt = """You are a regulatory compliance expert. Your core capabilities:
1. Read between the lines for subtext and unstated implications
2. Map regulatory requirements precisely
3. Spot arbitrage opportunities and gaps in regulations
4. Generate actionable compliance checklists with specific steps
Always provide detailed, truthful, actionable responses with clear structure.
### Instruction:
What are the key compliance requirements for utility-scale solar projects?
### Response:
"""
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.7)
print(tokenizer.decode(outputs[0]))
Documentation
- RAG Guide - Complete RAG setup and usage guide
- Platform Integration - Using RAG API from other repos (platform, zorora, etc.)
- Run Local - Running the API server as a background service
- Quick Start - Quick setup guide
- Local Install - Local installation instructions
Limitations
- Context window limited to 1024 tokens
- Quantitative calculations should be independently verified
- Training data current through July 25, 2025.
Training Details
- Base model: Mistral-7B-v0.3
- LoRA config: r=32, alpha=32, all attention + MLP layers
- Hardware: NVIDIA A10G
- Training framework: Unsloth
- Total training time: ~48 hours across all stages
- Optimizer: AdamW with cosine learning rate schedule
Evaluation
Performance metrics on held-out test set:
- Regulatory requirement identification: 92% accuracy
- Policy gap detection: 87% precision
- Compliance checklist generation: 4.2/5 expert rating
Citation
If you use this model, please cite:
@misc{energyanalyst2025,
author = {Shingai Samudzi},{Asoba Corporation},
title = {EnergyAnalyst-v0.1: A Fine-tuned Model for Energy Policy Analysis},
year = {2025},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/asoba/EnergyAnalyst-v0.1}}
}
Acknowledgments
This model was trained using the Unsloth library for efficient fine-tuning.
- Downloads last month
- -
Model tree for asoba/EnergyAnalyst-v0.1
Base model
mistralai/Mistral-7B-v0.3
# Gated model: Login with a HF token with gated access permission hf auth login