Transformers
English
File size: 2,892 Bytes
c4c12e3
 
 
 
 
 
cfde6a1
9423564
36f84cf
9423564
 
0ed53df
 
5ba822d
0ed53df
9423564
 
 
 
0ed53df
 
e0f0e70
 
 
 
0ed53df
cfde6a1
 
 
 
 
 
 
 
 
 
 
 
 
 
9423564
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
license: cc-by-nc-4.0
language:
- en
library_name: transformers
---
# Welcome to the xGen-small family!

**xGen-small** ([blog](https://www.salesforce.com/blog/xgen-small-enterprise-ready-small-language-models/), [arXiv](https://arxiv.org/abs/2505.06496)) is an enterprise-ready compact LM that combines domain-focused data curation, scalable pre-training, length-extension, and RL fine-tuning to deliver long-context performance at predictable, low cost.
**This model release is for research purposes only.**  

## Model Series

[xGen-small](https://www.salesforce.com/blog/xgen-small-enterprise-ready-small-language-models/) comes in two sizes (4B and 9B) with two variants (pre-trained and post-trained):

<p align="center">
<img width="60%" src="https://huggingface.co/Salesforce/xgen-small/resolve/main/xgen-small.png?download=true">
</p>

| Model                                 | # Total Params | Context Length | Variant      | Download       |
|---------------------------------------|----------------|----------------|--------------|----------------|
| salesforce/xgen-small-4B-base-r       | 4B             | 128k           | Pre-trained  | [🤗 Link](https://huggingface.co/Salesforce/xgen-small-4b-base-r) |
| salesforce/xgen-small-4B-instruct-r   | 4B             | 128k           | Post-trained | [🤗 Link](https://huggingface.co/Salesforce/xgen-small-4b-instruct-r) |
| salesforce/xgen-small-9B-base-r       | 9B             | 128k           | Pre-trained  | [🤗 Link](https://huggingface.co/Salesforce/xgen-small-9b-base-r) |
| salesforce/xgen-small-9B-instruct-r   | 9B             | 128k           | Post-trained | [🤗 Link](https://huggingface.co/Salesforce/xgen-small-9b-instruct-r) |

## Citation

```bibtex
@misc{xgensmall,
      title={xGen-small Technical Report}, 
      author={Erik Nijkamp and Bo Pang and Egor Pakhomov and Akash Gokul and Jin Qu and Silvio Savarese and Yingbo Zhou and Caiming Xiong},
      year={2025},
      eprint={2505.06496},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2505.06496}, 
}
```

## Ethical Considerations
This release is for research purposes only in support of an academic paper. Our models, datasets, and code are not specifically designed or evaluated for all downstream purposes. We strongly recommend users evaluate and address potential concerns related to accuracy, safety, and fairness before deploying this model. We encourage users to consider the common limitations of AI, comply with applicable laws, and leverage best practices when selecting use cases, particularly for high-risk scenarios where errors or misuse could significantly impact people's lives, rights, or safety. For further guidance on use cases, refer to our AUP and AI AUP.

## Model Licenses
The models are being released under CC-BY-NC-4.0, Copyright © Salesforce, Inc. All Rights Reserved.