Model reference · open weights
progen2 is an open-weight language model from hugohrban. 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 | hugohrban |
|---|---|
| Type | Language models |
| Task | Text gen |
| Parameters (lead) | 765M |
| Context | 2k tokens |
| Runs with | transformers |
| Released | 2024-06-08 |
| Popularity | 903 downloads / month |
| Licence | Open weights |
About
Mirror of the base ProGen2-base model (with slightly modified configuration and forward pass) by Nijkamp, et al..
See also my github repo for an example of finetuning this model.
Example usage:
from transformers import AutoModelForCausalLM
from tokenizers import Tokenizer
import torch
import torch.nn.functional as F
# load model and tokenizer
model = AutoModelForCausalLM.from_pretrained("hugohrban/progen2-base", trust_remote_code=True)
tokenizer = Tokenizer.from_pretrained("hugohrban/progen2-base")
tokenizer.no_padding()
# prepare input
prompt = "1MEVVIVTGMSGAGK"
input_ids = torch.tensor(tokenizer.encode(prompt).ids).to(model.device)
# forward pass
logits = model(input_ids).logits
# print output probabilities
next_token_logits = logits[-1, :]
next_token_probs = F.softmax(next_token_logits, dim=-1)
for i in range(tokenizer.get_vocab_size(with_added_tokens=False)):
print(f"{tokenizer.id_to_token(i)}: {100 * next_token_probs[i].item():.2f} %")
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys progen2 for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (progen2 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":"progen2","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.