Instructions to use Rijgersberg/Mistral-7B-v0.1-chat-nl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Rijgersberg/Mistral-7B-v0.1-chat-nl with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Rijgersberg/Mistral-7B-v0.1-chat-nl") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Rijgersberg/Mistral-7B-v0.1-chat-nl") model = AutoModelForCausalLM.from_pretrained("Rijgersberg/Mistral-7B-v0.1-chat-nl", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Rijgersberg/Mistral-7B-v0.1-chat-nl with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Rijgersberg/Mistral-7B-v0.1-chat-nl" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rijgersberg/Mistral-7B-v0.1-chat-nl", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Rijgersberg/Mistral-7B-v0.1-chat-nl
- SGLang
How to use Rijgersberg/Mistral-7B-v0.1-chat-nl 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 "Rijgersberg/Mistral-7B-v0.1-chat-nl" \ --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": "Rijgersberg/Mistral-7B-v0.1-chat-nl", "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 "Rijgersberg/Mistral-7B-v0.1-chat-nl" \ --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": "Rijgersberg/Mistral-7B-v0.1-chat-nl", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Rijgersberg/Mistral-7B-v0.1-chat-nl with Docker Model Runner:
docker model run hf.co/Rijgersberg/Mistral-7B-v0.1-chat-nl
Mistral-7B-v0.1-chat-nl
This model is a fine-tuned version of mistralai/Mistral-7B-v0.1 on the Rijgersberg/no_robots_nl and Rijgersberg/ultrachat_10k_nl datasets. It achieves the following results on the evaluation set:
- Loss: 1.0263
Model description
In order to investigate the effect of pretraining Rijgersberg/GEITje-7B on the finetuning of Rijgersberg/GEITje-7B-chat, I also subjected the base model Mistral 7B v0.1 to the exact same training. This model is called Mistral-7B-v0.1-chat-nl.
More info
Read more about GEITje and GEITje-chat in the 📄 README on GitHub.
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 1e-05
- train_batch_size: 2
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 8
- total_train_batch_size: 16
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 3
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.2404 | 0.2 | 236 | 1.1166 |
| 1.2103 | 0.4 | 472 | 1.1101 |
| 1.0357 | 0.6 | 708 | 1.0739 |
| 1.27 | 0.8 | 944 | 1.0540 |
| 1.3557 | 1.0 | 1180 | 1.0330 |
| 0.7919 | 1.2 | 1416 | 1.0368 |
| 0.8701 | 1.4 | 1652 | 1.0193 |
| 0.8851 | 1.6 | 1888 | 1.0009 |
| 0.7562 | 1.8 | 2124 | 0.9791 |
| 0.6838 | 2.0 | 2360 | 0.9823 |
| 0.5011 | 2.2 | 2596 | 1.0271 |
| 0.4495 | 2.39 | 2832 | 1.0267 |
| 0.5625 | 2.59 | 3068 | 1.0250 |
| 0.4486 | 2.79 | 3304 | 1.0262 |
| 0.5706 | 2.99 | 3540 | 1.0263 |
Framework versions
- Transformers 4.36.0.dev0
- Pytorch 2.1.1+cu121
- Datasets 2.15.0
- Tokenizers 0.15.0
- Downloads last month
- 7
Model tree for Rijgersberg/Mistral-7B-v0.1-chat-nl
Base model
mistralai/Mistral-7B-v0.1