scalar-phos

License Base Model Method MMLU Score Format

Scalar Phos Pro is an instruction-tuned generative language model based on the Llama-3.1-8B-Instruct architecture. It has been optimized using QLoRA to improve specialized instruction following and broad reasoning performance while keeping deployment lightweight and efficient.


Looking for quantized local weights (Ollama / LM Studio / llama.cpp)?
Check out the dedicated GGUF repository: scalar-ai/scalar-phos-pro-gguf
Looking for merged weights?
Check out the dedicated repository: scalar-ai/scalar-phos-pro-merged


Model Summary

Parameter / Feature Model Specification
Architecture Auto-regressive Dense Transformer
Total Parameters 8.03 Billion (~8B)
Base Model Meta Llama 3.1 8B Instruct
Fine-Tuning Method QLoRA (Quantized Low-Rank Adaptation)
Number of Layers 32
Attention Heads 32 (Grouped-Query Attention / GQA)
Hidden Dimension 4096
Vocabulary Size 128,256
Context Length 128,000 (128k) tokens
Attention Mechanism Rotary Position Embeddings (RoPE) + GQA
Precision / Format FP16, BF16, 4-bit (QLoRA / PEFT Safetensors)
Modality Text (Multilingual / Instruction-Tuned)
License Llama 3.1 Community License Agreement

Benchmark Performance (MMLU)

The model was evaluated using EleutherAI's evaluation harness (lm-evaluation-harness) under zero-shot conditions. Below is a performance comparison of Scalar Phos Pro against other leading open-weights models in the 7B to 9B parameter range on the MMLU benchmark:

Benchmark / Category Scalar Phos Pro Llama-3.1-8B-Instruct Qwen2.5-7B-Instruct Gemma-2-9B-Instruct GPT-4o-mini Claude 3 Haiku
Parameters / Class 8.0B (QLoRA) 8.0B 7.6B 9.2B ~8B equivalent ~8B equivalent
Overall MMLU 66.55% 69.4% 74.2% 71.3% 70.2% 75.2%
Social Sciences 78.06% 80.2% 83.1% 79.5% 81.0% 82.4%
Humanities 69.23% 71.5% 76.4% 73.0% 72.8% 76.9%
Other (Business/Medicine) 68.72% 70.8% 75.9% 72.4% 73.1% 77.0%
STEM 55.96% 58.1% 63.5% 60.2% 58.4% 64.1%

File Structure & Repository Contents

This repository contains the full QLoRA adapter weights (adapter_config.json, adapter_model.safetensors, tokenizer files) for merging back into the base model or continued fine-tuning via Hugging Face transformers and peft.

For quantized GGUF binaries (Q4_K_M, Q5_K_M, Q8_0) and Ollama Modelfiles, visit scalar-ai/scalar-phos-pro-gguf.


How to Use

Loading via Python (transformers + peft)

You can load the base model and apply the LoRA adapters using the following Python snippet:

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base_model_id = "meta-llama/Llama-3.1-8B-Instruct"
adapter_path = "scalar-ai/scalar-phos-pro"

# Load tokenizer and base model
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
base_model = AutoModelForCausalLM.from_pretrained(
    base_model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto"
)

# Load LoRA weights
model = PeftModel.from_pretrained(base_model, adapter_path)

# Run a test generation
inputs = tokenizer("Explain quantum computing in simple terms:", return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

License

Both the code repository and the model are released under the LLama 3.1 Community License Agreement.


Downloads last month
222
Safetensors
Model size
8B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ 2 Ask for provider support

Model tree for scalar-ai/scalar-phos-pro

Adapter
(3,118)
this model

Collection including scalar-ai/scalar-phos-pro