You need to agree to share your Hugging Face information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Llama 3.1 8B โ€” Agricultural B2B Intelligence (merged weights, experiment)

Built with Llama.

Personal experiment (December 2025). This repo contains the LoRA adapter from llama-agri-b2b-intelligence merged into Llama-3.1-8B-Instruct, so it loads without PEFT. The full training details, data provenance, and limitations are on the adapter card. It has only been evaluated by loss. No task benchmark yet.

Merged vs adapter

This repo (merged) LoRA adapter repo
Download size ~16 GB (8.03B params in BF16) 1.34 GB adapter + the base model
Needs PEFT No Yes
Inference cost Same as base Llama-3.1-8B Small extra matmuls per layer unless merged
Outputs Equivalent to the adapter, up to BF16 rounding from the merge โ€”
Good for GGUF conversion, Ollama, plain transformers Storage-limited setups, swapping adapters

Merging folds the low-rank update into each weight, Wโ€ฒ = W + (ฮฑ/r)ยทBยทA. After that the model runs at exactly the base model's cost. I haven't benchmarked the adapter-vs-merged speed difference, so I make no speed-up claim here.

Quick start

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model_id = "sarathi-balakrishnan/llama-agri-b2b-intelligence-merged"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")

messages = [
    {"role": "system", "content": "You are an agricultural business intelligence analyst."},
    {"role": "user", "content": "Analyze corn market opportunities in Iowa for a seed company."},
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=1000, temperature=0.7, do_sample=True)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

Convert to GGUF for llama.cpp / Ollama

git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp && pip install -r requirements.txt

huggingface-cli download sarathi-balakrishnan/llama-agri-b2b-intelligence-merged \
    --local-dir ./agri-b2b-merged

python convert_hf_to_gguf.py ./agri-b2b-merged --outfile agri-b2b-q8.gguf --outtype q8_0

cat > Modelfile <<'MF'
FROM ./agri-b2b-q8.gguf
SYSTEM "You are an agricultural business intelligence analyst."
MF
ollama create agri-b2b -f Modelfile
ollama run agri-b2b

I haven't measured tokens/s on Apple Silicon or other local hardware for this model.

Training summary (details on the adapter card)

Method LoRA SFT on teacher-generated responses (sequence-level distillation)
Teacher outputs 5,007 Claude Sonnet 4 + 4,993 GPT-4.1 (10,000 examples)
LoRA r = 128, ฮฑ = 256, all 7 projections, 335.5M trainable params before merging
Hardware / time 1ร— NVIDIA DGX Spark (GB10), ~55 h, 3 epochs
Final loss train ~0.70, validation ~0.78
Task benchmark Pending

About the teacher data. The training targets are outputs from third-party models. Use of this model is also subject to the terms of the providers whose models generated them (Anthropic and OpenAI), in addition to the Llama 3.1 Community License. Please review those terms for your use case.

Limitations

Not benchmarked. Trained on unverified synthetic answers, so statistics in outputs can be invented. US-only, English-only. Not for regulatory, lending, insurance, investment, or trading decisions.

License

Distributed under the Llama 3.1 Community License, subject to Meta's Acceptable Use Policy. Llama 3.1 is licensed under the Llama 3.1 Community License, Copyright ยฉ Meta Platforms, Inc. All Rights Reserved.

Citation

@misc{llama-agri-b2b-intelligence-merged-2025,
  title  = {Llama 3.1 8B Agricultural B2B Intelligence (merged): a sequence-level distillation experiment},
  author = {Sarathi Balakrishnan},
  year   = {2025},
  publisher = {Hugging Face},
  url    = {https://huggingface.co/sarathi-balakrishnan/llama-agri-b2b-intelligence-merged}
}
Downloads last month
-
Safetensors
Model size
8B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for sarathi-balakrishnan/llama-agri-b2b-intelligence-merged

Finetuned
(3307)
this model