Model reference · open weights
PowerLM is an open-weight language model from ibm-research. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | IBM |
|---|---|
| Published under | ibm-research |
| Type | Language models |
| Task | Text gen |
| Parameters (lead) | 3.5B |
| Context | 4k tokens |
| Runs with | transformers |
| Released | 2024-08-14 |
| Popularity | 52k downloads / month |
| Licence | Open weights |
About
PowerLM-3B is a 3B state-of-the-art small language model trained with the Power learning rate scheduler. It is trained on a mix of open-source and proprietary datasets. PowerLM-3B has shown promising results compared to other models in the size categories across various benchmarks, including natural language multi-choices, code generation, and math reasoning. Paper: https://arxiv.org/abs/2408.13359
Note: Requires installing HF transformers from source.
This is a simple example of how to use PowerLM-3b model.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda" # or "cpu"
model_path = "ibm/PowerLM-3b"
tokenizer = AutoTokenizer.from_pretrained(model_path)
# drop device_map if running on CPU
model = AutoModelForCausalLM.from_pretrained(model_path, device_map=device)
model.eval()
# change input text as desired
prompt = "Write a code to find the maximum value in a list of numbers."
# tokenize the text
input_tokens = tokenizer(prompt, return_tensors="pt")
# transfer tokenized inputs to the device
for i in input_tokens:
input_tokens[i] = input_tokens[i].to(device)
# generate output tokens
output = model.generate(**input_tokens, max_new_tokens=100)
# decode output tokens into text
output = tokenizer.batch_decode(output)
# loop over the batch to print, in this example the batch size is 1
for i in output:
print(i)
From the published model card. Full card on the HuggingFace links in the sidebar.
Benchmarks
As published on the model card — the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| text-generation | ARC | accuracy-norm | 60.500 |
| text-generation | BoolQ | accuracy | 72 |
| text-generation | Hellaswag | accuracy-norm | 74.600 |
| text-generation | OpenBookQA | accuracy-norm | 43.600 |
| text-generation | PIQA | accuracy-norm | 79.900 |
| text-generation | Winogrande | accuracy-norm | 70 |
| text-generation | MMLU (5 shot) | accuracy | 49.200 |
| text-generation | GSM8k (5 shot) | accuracy | 34.900 |
| text-generation | math (4 shot) | accuracy | 15.200 |
| text-generation | humaneval | pass@1 | 26.800 |
| text-generation | MBPP | pass@1 | 33.600 |
Using it via the API
Once AxForge deploys powerlm for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (powerlm below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/chat/completions \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"powerlm","messages":[{"role":"user","content":"Hello"}]}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.