How to use from
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 edoggy/commodities-crop-analyst-7b:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf edoggy/commodities-crop-analyst-7b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf edoggy/commodities-crop-analyst-7b:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf edoggy/commodities-crop-analyst-7b:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-app
# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama serve -hf edoggy/commodities-crop-analyst-7b:Q4_K_M
# Run inference directly in the terminal:
./build/bin/llama cli -hf edoggy/commodities-crop-analyst-7b:Q4_K_M
Use Docker
docker model run hf.co/edoggy/commodities-crop-analyst-7b:Q4_K_M
Quick Links

commodities-crop-analyst-7b (v1)

A tool-calling LoRA on Qwen2.5-7B-Instruct that answers crop-supply questions only from data it queries — USDA CDL county acreage (11 states, 2018–2024), the 2022 Census of Agriculture, IBGE São Paulo yields, USDA report dates, and front-month futures for sugar, orange juice, corn, soybeans, wheat and cotton. It never states a number it didn't compute. Self-contained: the data, tools and runtime ship in this repo.

What it does

  • Area, change, rankings, state comparisons from the CDL; sugarcane model-vs-CDL-vs-census validation by county.
  • Price history and a statistical price projection (price_forecast): seasonal drift + volatility cone with an 80% interval and the method's backtested error (6–11% at 30 days; interval coverage 78–84%). The point estimate has no directional edge and the model says so. "Should I buy?" gets context, not a call.
  • Next-year Louisiana sugarcane expansion from sugarcane-forecast-v2 (new-cane recall 0.95 / precision 0.83; removals under-predicted).
  • Renders sugarcane probability maps for 20 LA/FL counties (sugarcane-classifier-v1) and price charts.
  • Asks a clarifying question when a year or place is missing; says so when something is outside the data.

Evaluation (785 held-out questions whose phrasings never appeared in training)

Q4_K_M GGUF (Ollama) LoRA adapter (4-bit HF)
Correct tool chosen 95.2% 95.6%
Exact arguments 92.6% 92.9%
Executed result identical to gold 92.6% 92.9%
Malformed tool calls 0 0
Underspecified / out-of-scope handled without a tool call 177 / 177 177 / 177

Run it (Ollama — any machine with ~6 GB free RAM/VRAM)

pip install gradio requests pandas pyarrow rasterio matplotlib joblib scikit-learn
hf download edoggy/commodities-crop-analyst-7b --local-dir commodities-crop-analyst && cd commodities-crop-analyst
ollama create commodities-crop-analyst -f Modelfile
python runtime.py                                  # chat UI at http://localhost:7860

Or with the LoRA adapter on a CUDA GPU (12 GB, 4-bit): pip install transformers peft bitsandbytes accelerate then python runtime.py --backend hf --adapter .

Each reply shows the answer, any image, and the exact tool call + result underneath so every number can be checked.

Training

12,000 synthetic examples generated from the bundled tables (45_gen_v2.py): questions sampled from 24–66 LLM-paraphrased phrasings per intent (44_paraphrase.py), gold tool calls, gold answers computed from the data, plus clarify/out-of-scope cases. QLoRA r=16, 400 steps, lr 1e-4, on one RTX 5070.

Limits — read before using

  • Not a trading tool. Satellite/CDL area for a year is only available after USDA's own reports; nothing here has a timing edge. Forecasts are baselines with error bars, not predictions of direction.
  • Long-horizon price projections (>120 days) are under-calibrated in backtests for volatile contracts (e.g. orange juice); the tool flags this in its output.
  • US coverage only (LA, FL, TX, IA, IL, IN, MN, NE, KS, ND, GA), 2018–2024; one Brazilian state's yields; no stocks, demand, FX or in-season weather.
  • Acreage is map-derived; county year-over-year changes under ~5% are within mapping noise.
  • A 7% tool-argument error rate means: check the tool call shown under each answer for anything that matters.

Base model: Qwen2.5-7B-Instruct (Apache-2.0). Data: USDA NASS (public domain), IBGE, NASA POWER, Yahoo Finance, Google Satellite Embedding V1 (CC-BY-4.0) via the linked models.

Downloads last month
67
GGUF
Model size
8B params
Architecture
qwen2
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for edoggy/commodities-crop-analyst-7b

Base model

Qwen/Qwen2.5-7B
Adapter
(2,909)
this model

Datasets used to train edoggy/commodities-crop-analyst-7b