Text Generation
Transformers
Safetensors
GGUF
Dutch
English
apertus
dutch
nederlands
continued-pretraining
conversational
Instructions to use WAINUT/walnoot-8b-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WAINUT/walnoot-8b-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="WAINUT/walnoot-8b-instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("WAINUT/walnoot-8b-instruct") model = AutoModelForCausalLM.from_pretrained("WAINUT/walnoot-8b-instruct", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use WAINUT/walnoot-8b-instruct with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf WAINUT/walnoot-8b-instruct:BF16 # Run inference directly in the terminal: llama cli -hf WAINUT/walnoot-8b-instruct:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf WAINUT/walnoot-8b-instruct:BF16 # Run inference directly in the terminal: llama cli -hf WAINUT/walnoot-8b-instruct:BF16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf WAINUT/walnoot-8b-instruct:BF16 # Run inference directly in the terminal: ./llama-cli -hf WAINUT/walnoot-8b-instruct:BF16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf WAINUT/walnoot-8b-instruct:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf WAINUT/walnoot-8b-instruct:BF16
Use Docker
docker model run hf.co/WAINUT/walnoot-8b-instruct:BF16
- LM Studio
- Jan
- vLLM
How to use WAINUT/walnoot-8b-instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "WAINUT/walnoot-8b-instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WAINUT/walnoot-8b-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/WAINUT/walnoot-8b-instruct:BF16
- SGLang
How to use WAINUT/walnoot-8b-instruct 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 "WAINUT/walnoot-8b-instruct" \ --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": "WAINUT/walnoot-8b-instruct", "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 "WAINUT/walnoot-8b-instruct" \ --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": "WAINUT/walnoot-8b-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use WAINUT/walnoot-8b-instruct with Ollama:
ollama run hf.co/WAINUT/walnoot-8b-instruct:BF16
- Unsloth Desktop
- Docker Model Runner
How to use WAINUT/walnoot-8b-instruct with Docker Model Runner:
docker model run hf.co/WAINUT/walnoot-8b-instruct:BF16
- Lemonade
How to use WAINUT/walnoot-8b-instruct with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull WAINUT/walnoot-8b-instruct:BF16
Run and chat with the model
lemonade run user.walnoot-8b-instruct-BF16
List all available models
lemonade list
- Atomic Chat
Download Modelfile from WAINUT/walnoot-8b-instruct: direct link, hf CLI and curl.
- Browser
- Download file 3.39 kB
-
https://huggingface.co/WAINUT/walnoot-8b-instruct/resolve/main/Modelfile
- Command line
-
hf download hf://WAINUT/walnoot-8b-instruct/Modelfile
-
curl -L -o Modelfile https://huggingface.co/WAINUT/walnoot-8b-instruct/resolve/main/Modelfile
3.39 kB
| # Modelfile voor Walnoot, WAINUT. | |
| # | |
| # Bouwen en draaien: | |
| # | |
| # ollama create walnoot-8b-instruct -f Modelfile | |
| # ollama run walnoot-8b-instruct | |
| # | |
| # Zet dit bestand in dezelfde map als het gguf-bestand. | |
| # | |
| # LET OP, en dit kost anders een halve avond zoeken: de OpenAI-compatibele route | |
| # van Ollama (/v1/chat/completions) negeert top_k, min_p en repeat_penalty, en | |
| # zet temperature en top_p HARD op 1,0 als de client ze niet meestuurt. Gebruik | |
| # de eigen route /api/chat, of stuur temperature en top_p altijd expliciet mee. | |
| FROM ./walnoot-8b-instruct-bf16.gguf | |
| # De neutrale bemonsterpreset. Temperatuur 0 is met opzet: zo is een draai | |
| # herhaalbaar en meet je het model en niet de ruis. Voor vrijer chatten kun je | |
| # temperature op 0.7 en top_p op 0.9 zetten. | |
| PARAMETER temperature 0.0 | |
| PARAMETER top_p 1.0 | |
| PARAMETER top_k 0 | |
| PARAMETER min_p 0.0 | |
| PARAMETER repeat_penalty 1.0 | |
| PARAMETER repeat_last_n 64 | |
| PARAMETER presence_penalty 0.0 | |
| PARAMETER frequency_penalty 0.0 | |
| PARAMETER typical_p 1.0 | |
| PARAMETER num_predict -1 | |
| # Het model kan 32768 tokens context aan. Hier staat 8192, want dat is de | |
| # waarde waarmee wij hebben getest en het scheelt geheugen. Voor lange | |
| # documenten kun je hem ophogen tot 32768. | |
| PARAMETER num_ctx 8192 | |
| # Stoptokens. Het gguf draagt <|assistant_end|> al als eos-token; de andere twee | |
| # zijn een vangnet tegen doorlopen in een nieuwe beurt. | |
| PARAMETER stop "<|assistant_end|>" | |
| PARAMETER stop "<|user_start|>" | |
| PARAMETER stop "<|system_start|>" | |
| TEMPLATE """{{- if .System }}<|system_start|>{{ .System }}<|system_end|>{{ end }} | |
| {{- range .Messages }} | |
| {{- if eq .Role "user" }}<|user_start|>{{ .Content }}<|user_end|> | |
| {{- else if eq .Role "assistant" }}<|assistant_start|>{{ .Content }}<|assistant_end|> | |
| {{- end }} | |
| {{- end }}<|assistant_start|>""" | |
| SYSTEM """Je bent Walnoot, een Nederlands taalmodel ontwikkeld door WAINUT. Je helpt gebruikers | |
| feitelijk en duidelijk in correct Nederlands; schrijft de gebruiker in een andere taal, | |
| dan antwoord je in die taal. Als je iets niet zeker weet, zeg je dat eerlijk. | |
| Over je identiteit ben je in elke taal open en consistent. Bij elke vraag over wie of wat | |
| je bent noem je jezelf Walnoot en je maker WAINUT, ook in het Engels of een andere taal. | |
| Op een vraag naar je technische herkomst antwoord je gelaagd en eerlijk: je bouwt voort | |
| op een open Europees basismodel dat WAINUT verder heeft getraind voor de Nederlandse taal | |
| en voor instructiegebruik. Uitsluitend wanneer er daarna uitdrukkelijk wordt doorgevraagd | |
| welk basismodel dat is, antwoord je dat het basismodel Apertus is, en ook dan noem je | |
| jezelf Walnoot; in elk ander antwoord gebruik je alleen de woorden "een open Europees | |
| basismodel" en laat je de naam van het basismodel weg. Je ontkent nooit dat je een AI | |
| bent of dat je op een basismodel voortbouwt, en je claimt nooit een ander model of een | |
| andere maker te zijn. | |
| Voor vragen over WAINUT als bedrijf (team, oprichters, prijzen, klanten, contact) verwijs | |
| je in woorden naar WAINUT zelf en verzin je geen namen of feiten. Je noemt nooit een | |
| webadres of link, ook niet als er om wordt gevraagd; zeg in plaats daarvan dat de | |
| gebruiker WAINUT online kan opzoeken. | |
| Geef bondige, volledige antwoorden. Wanneer je antwoord af is, stop je; daarna voeg je | |
| niets meer toe, geen voorbeelden, geen losse tekst en geen nieuw onderwerp.""" | |