--- license: apache-2.0 pipeline_tag: text-generation library_name: transformers tags: - multilingual - compliant - swiss-ai - apertus --- # Same model as original, but without privacy-violating gating mechanism. ### Apertus LLM Acceptable Use Policy (1.0 | September 1, 2025) -Agreement - The Swiss National AI Institute (SNAI) is a partnership between the two Swiss Federal Institutes of Technology, ETH Zurich and EPFL. By using the Apertus LLM you agree to indemnify, defend, and hold harmless ETH Zurich and EPFL against any third-party claims arising from your use of Apertus LLM. The training data and the Apertus LLM may contain or generate information that directly or indirectly refers to an identifiable individual (Personal Data). You process Personal Data as independent controller in accordance with applicable data protection law. SNAI will regularly provide a file with hash values for download which you can apply as an output filter to your use of our Apertus LLM. The file reflects data protection deletion requests which have been addressed to SNAI as the developer of the Apertus LLM. It allows you to remove Personal Data contained in the model output. We strongly advise downloading and applying this output filter from SNAI every six months following the release of the model. # Apertus ![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/6639f08490b7db8dcbf1a2aa/YKux3SpTciL4O60L3Ol-6.jpeg) ## Table of Contents 1. [Model Summary](#model-summary) 2. [How to use](#how-to-use) 3. [Evaluation](#evaluation) 4. [Training](#training) 5. [Limitations](#limitations) 6. [Legal Aspects](#legal-aspects) ## Model Summary Apertus is a 70B and 8B parameter language model designed to push the boundaries of fully-open multilingual and transparent models. The model supports over 1000 languages and long context, it uses only fully compliant and open training data, and achieves comparable performance to models trained behind closed doors. ![image/png](https://cdn-uploads.huggingface.co/production/uploads/654baf61d625e083383dfd00/gKDv_6dpIpvmgyquenbXt.png) The model is a decoder-only transformer, pretrained on 15T tokens with a staged curriculum of web, code and math data. The model uses a new xIELU activation function and is trained from scratch with the AdEMAMix optimizer. Post-training included supervised fine-tuning and alignment via QRPO. ### Key features - **Fully open model**: open weights + open data + full training details including all data and training recipes - **Massively Multilingual**: 1811 natively supported languages - **Compliant** Apertus is trained while respecting opt-out consent of data owners (even retrospectivey), and avoiding memorization of training data For more details refer to our [technical report](https://huggingface.co/adamo1139/Apertus-70B-2509-ungated/blob/main/Apertus_Tech_Report.pdf) ## How to use The modeling code for Apertus is available in transformers `v4.56.0`, so make sure to upgrade your transformers version. You can also load the model with the latest `vLLM` which uses transformers as a backend. ```bash pip install -U transformers ``` ```python from transformers import AutoModelForCausalLM, AutoTokenizer model_name = "adamo1139/Apertus-8B-2509-ungated" device = "cuda" # for GPU usage or "cpu" for CPU usage # load the tokenizer and the model tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForCausalLM.from_pretrained( model_name, ).to(device) # prepare the model input prompt = "Give me a brief explanation of gravity in simple terms." messages_think = [ {"role": "user", "content": prompt} ] text = tokenizer.apply_chat_template( messages_think, tokenize=False, add_generation_prompt=True, ) model_inputs = tokenizer([text], return_tensors="pt").to(model.device) # Generate the output generated_ids = model.generate(**model_inputs, max_new_tokens=32768) # Get and decode the output output_ids = generated_ids[0][len(model_inputs.input_ids[0]) :] print(tokenizer.decode(output_ids, skip_special_tokens=True)) ``` >[!TIP] > We recommend setting `temperature=0.8` and `top_p=0.9` in the sampling parameters. ### Long context processing Apertus by default supports a context length up to 65,536 tokens. ### Agentic Usage Apertus supports tool use ### vLLM and SGLang You can use vLLM and SGLang to deploy the model in an API compatible with OpenAI format. ## Evaluation In this section, we report the evaluation results of Apertus model. ### Base Pre-Trained Model - see [Apertus_Tech_Report.pdf](https://huggingface.co/adamo1139/Apertus-8B-2509-ungated/blob/main/Apertus_Tech_Report.pdf) ### Instruction Model - see [Apertus_Tech_Report.pdf](https://huggingface.co/adamo1139/Apertus-8B-2509-ungated/blob/main/Apertus_Tech_Report.pdf) ## Training ### Model - **Architecture:** Transformer decoder - **Pretraining tokens:** 15T - **Precision:** bfloat16 ### Software & hardware - **GPUs:** 4096 GH200 - **Training Framework:** [Megatron-LM](https://github.com/swiss-ai/Megatron-LM) - ... ### Open resources All elements used in the training process are made openly available - **Training data reconstruction scripts:** [github.com/swiss-ai/pretrain-data](https://github.com/swiss-ai/pretrain-data) - The training intermediate checkpoints are available on the different branches of this same repository ## Limitations Apertus can produce text on a variety of topics, but the generated content may not always be factually accurate, logically consistent, or free from biases present in the training data. These models should be used as assistive tools rather than definitive sources of information. Users should always verify important information and critically evaluate any generated content. ## Legal Aspects #### EU AI Act Transparency Documentation and Code of Practice - [Apertus_EU_Public_Summary.pdf](https://huggingface.co/adamo1139/Apertus-8B-2509-ungated/blob/main/Apertus_EU_Public_Summary.pdf) - [Apertus_EU_Code_of_Practice.pdf](https://huggingface.co/adamo1139/Apertus-8B-2509-ungated/blob/main/Apertus_EU_Code_of_Practice.pdf) #### Data Protection and Copyright Requests For removal requests of personally identifiable information (PII) or of copyrighted content, please contact the respective dataset owners or us directly - llm-privacy-requests@swiss-ai.org - llm-copyright-requests@swiss-ai.org #### Output Filter for PII - Currently no output filter is provided. - Please check this site regularly for an output filter that can be used on top of the Apertus LLM. The filter reflects data protection deletion requests which have been addressed to us as the developer of the Apertus LLM. It allows you to remove Personal Data contained in the model output. We strongly advise downloading and applying this output filter from this site every six months. ## Contact To contact us, please send an email to llm-requests@swiss-ai.org ## Citation ```bash @misc{swissai2025apertus, title={{Apertus: Democratizing Open and Compliant LLMs for Global Language Environments}}, author={Apertus Team}, year={2025}, howpublished={\url{https://huggingface.co/swiss-ai/Apertus-70B-2509}} } ```