Instructions to use moncefem/Apertus-Nash-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use moncefem/Apertus-Nash-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="moncefem/Apertus-Nash-8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("moncefem/Apertus-Nash-8B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use moncefem/Apertus-Nash-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "moncefem/Apertus-Nash-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "moncefem/Apertus-Nash-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/moncefem/Apertus-Nash-8B
- SGLang
How to use moncefem/Apertus-Nash-8B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "moncefem/Apertus-Nash-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "moncefem/Apertus-Nash-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "moncefem/Apertus-Nash-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "moncefem/Apertus-Nash-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use moncefem/Apertus-Nash-8B with Docker Model Runner:
docker model run hf.co/moncefem/Apertus-Nash-8B
Apertus Nash 8B
By moncif ยท Code, data and training details: github.com/moncifem/apertus-nash
Apertus Nash is Apertus-v1.5-8B fine-tuned for mathematics, statistics and economics. It reasons in plain prose before answering, answers in readable language, and thinks much less than the base model on simple requests.
It was trained with LoRA in two parts: supervised fine-tuning (a broad reasoning mix, then a small economics and mathematics set with code-verified answers), then reinforcement learning from AI feedback (GRPO, with rewards from an AI judge grounded in verified answers). This repository holds the final RL checkpoint (step 517), merged into the base weights.
Experimental: trained on a single DGX Spark over a few days; not a finished model. Loading it needs a transformers version with
Apertus 1.5 support. Part of the SFT data is CC-BY-NC-4.0; see the GitHub repository for sources and licences.
- Downloads last month
- 22
Model tree for moncefem/Apertus-Nash-8B
Base model
swiss-ai/Apertus-v1.5-8B