Views
No views yet

| Model | # Total Params | Context Length | Variant | Download |
|---|---|---|---|---|
| salesforce/xgen-small-4B-base-r | 4B | 128k | Pre-trained | 🤗 Link |
| salesforce/xgen-small-4B-instruct-r | 4B | 128k | Post-trained | 🤗 Link |
| salesforce/xgen-small-9B-base-r | 9B | 128k | Pre-trained | 🤗 Link |
| salesforce/xgen-small-9B-instruct-r | 9B | 128k | Post-trained | 🤗 Link |
1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4model_name = "Salesforce/xgen-small-9B-base-r"
5tokenizer = AutoTokenizer.from_pretrained(model_name)
6device = "cuda" if torch.cuda.is_available() else "cpu"
7model = AutoModelForCausalLM.from_pretrained(
8 model_name,
9 torch_dtype="auto"
10).to(device)
11
12prompt = "What is Salesforce?"
13inputs = tokenizer(
14 prompt,
15 return_tensors="pt",
16 padding=False,
17 truncation=True
18).to(device)
19
20generated = model.generate(**inputs, max_new_tokens=32)
21output = tokenizer.decode(
22 generated[0],
23 skip_special_tokens=True,
24)
25print(output)| Category | Task | Llama 3.1-8B | Granite 3.3-8B | Qwen2.5-7B | xGen-small 9B Base |
|---|---|---|---|---|---|
| General Knowledge & Reasoning | ARC-Challenge | 58.0 | 62.5 | 63.7 | 67.4 |
| General Knowledge & Reasoning | Big-Bench Hard | 46.3 | 46.8 | 53.6 | 58.2 |
| General Knowledge & Reasoning | HellaSwag | 81.8 | 83.0 | 80.0 | 83.7 |
| General Knowledge & Reasoning | MMLU | 65.1 | 62.7 | 74.2 | 71.1 |
| General Knowledge & Reasoning | MMLU-Pro | 32.7 | 31.3 | 43.7 | 39.8 |
| General Knowledge & Reasoning | TruthfulQA | 45.2 | 52.2 | 56.4 | 48.6 |
| General Knowledge & Reasoning | WinoGrande | 76.9 | 80.3 | 76.1 | 78.6 |
| Math & Science | GPQA | 31.9 | 30.3 | 31.4 | 32.0 |
| Math & Science | GSM8K | 55.6 | 61.4 | 79.1 | 83.2 |
| Math & Science | MATH | 22.0 | 30.9 | 50.2 | 52.5 |
| Coding | HumanEval | 37.3 | 38.9 | 55.2 | 53.9 |
| Coding | HumanEval+ | 31.4 | 34.3 | 47.7 | 47.9 |
| Coding | MBPP | 45.0 | 43.5 | 57.1 | 50.1 |
| Coding | MBPP+ | 51.0 | 48.1 | 64.8 | 57.6 |
1@misc{xgensmall,
2 title={xGen-small Technical Report},
3 author={Erik Nijkamp and Bo Pang and Egor Pakhomov and Akash Gokul and Jin Qu and Silvio Savarese and Yingbo Zhou and Caiming Xiong},
4 year={2025},
5 eprint={2505.06496},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2505.06496},
9}