Text Generation
Transformers
Safetensors
GGUF
Swedish
swedish
driving-license
körkort
fine-tuned
qwen2
Instructions to use SlipsKnuten/korkortlarare with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SlipsKnuten/korkortlarare with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SlipsKnuten/korkortlarare")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("SlipsKnuten/korkortlarare", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use SlipsKnuten/korkortlarare 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 SlipsKnuten/korkortlarare:F16 # Run inference directly in the terminal: llama cli -hf SlipsKnuten/korkortlarare:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf SlipsKnuten/korkortlarare:F16 # Run inference directly in the terminal: llama cli -hf SlipsKnuten/korkortlarare:F16
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 SlipsKnuten/korkortlarare:F16 # Run inference directly in the terminal: ./llama-cli -hf SlipsKnuten/korkortlarare:F16
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 SlipsKnuten/korkortlarare:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf SlipsKnuten/korkortlarare:F16
Use Docker
docker model run hf.co/SlipsKnuten/korkortlarare:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use SlipsKnuten/korkortlarare with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SlipsKnuten/korkortlarare" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SlipsKnuten/korkortlarare", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/SlipsKnuten/korkortlarare:F16
- SGLang
How to use SlipsKnuten/korkortlarare 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 "SlipsKnuten/korkortlarare" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SlipsKnuten/korkortlarare", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "SlipsKnuten/korkortlarare" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SlipsKnuten/korkortlarare", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use SlipsKnuten/korkortlarare with Ollama:
ollama run hf.co/SlipsKnuten/korkortlarare:F16
- Unsloth Desktop
- Docker Model Runner
How to use SlipsKnuten/korkortlarare with Docker Model Runner:
docker model run hf.co/SlipsKnuten/korkortlarare:F16
- Lemonade
How to use SlipsKnuten/korkortlarare with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull SlipsKnuten/korkortlarare:F16
Run and chat with the model
lemonade run user.korkortlarare-F16
List all available models
lemonade list
- Atomic Chat
Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- README.md +56 -39
- korkortlarare-f16.gguf +3 -0
.gitattributes
CHANGED
|
@@ -40,3 +40,4 @@ gguf/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
|
| 40 |
gguf_new/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 41 |
lora/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 42 |
merged/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 40 |
gguf_new/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 41 |
lora/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 42 |
merged/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
korkortlarare-f16.gguf filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,59 +1,76 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
|
|
|
| 3 |
library_name: transformers
|
| 4 |
-
|
| 5 |
tags:
|
| 6 |
-
-
|
| 7 |
-
-
|
| 8 |
-
-
|
| 9 |
-
-
|
| 10 |
-
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
-
#
|
| 14 |
|
| 15 |
-
|
| 16 |
-
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 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 |
|
|
|
|
|
|
|
|
|
|
| 46 |
|
|
|
|
| 47 |
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
```bibtex
|
| 51 |
-
@misc{vonwerra2022trl,
|
| 52 |
-
title = {{TRL: Transformer Reinforcement Learning}},
|
| 53 |
-
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
|
| 54 |
-
year = 2020,
|
| 55 |
-
journal = {GitHub repository},
|
| 56 |
-
publisher = {GitHub},
|
| 57 |
-
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 58 |
-
}
|
| 59 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- sv
|
| 5 |
library_name: transformers
|
| 6 |
+
base_model: Qwen/Qwen2.5-7B-Instruct
|
| 7 |
tags:
|
| 8 |
+
- gguf
|
| 9 |
+
- swedish
|
| 10 |
+
- driving-license
|
| 11 |
+
- körkort
|
| 12 |
+
- fine-tuned
|
| 13 |
+
- qwen2
|
| 14 |
+
pipeline_tag: text-generation
|
| 15 |
---
|
| 16 |
|
| 17 |
+
# Korkortlarare - Swedish Driving License Theory Assistant
|
| 18 |
|
| 19 |
+
A fine-tuned Qwen2.5-7B-Instruct model specialized for Swedish driving license theory (körkortsteori).
|
|
|
|
| 20 |
|
| 21 |
+
## Model Details
|
| 22 |
|
| 23 |
+
- **Base Model:** [Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct)
|
| 24 |
+
- **Fine-tuning Method:** LoRA with Unsloth
|
| 25 |
+
- **Training Data:** 4,080 Swedish driving license Q&A pairs
|
| 26 |
+
- **Format:** GGUF F16 (full precision)
|
| 27 |
+
- **Size:** 15.2 GB
|
| 28 |
+
- **Language:** Swedish (sv)
|
| 29 |
|
| 30 |
+
## Intended Use
|
| 31 |
+
|
| 32 |
+
This model is designed to help users study for the Swedish driving license theory test (körkortsteori). It can answer questions about:
|
| 33 |
+
|
| 34 |
+
- Traffic rules (Trafikregler)
|
| 35 |
+
- Road signs (Vägmärken)
|
| 36 |
+
- Safety (Säkerhet)
|
| 37 |
+
- Vehicle and environment (Fordon och Miljö)
|
| 38 |
+
- Parking and special situations
|
| 39 |
+
- Laws and regulations
|
| 40 |
+
- Practical driving
|
| 41 |
+
|
| 42 |
+
## Usage with Ollama
|
| 43 |
+
|
| 44 |
+
```bash
|
| 45 |
+
ollama run SlipsKnuten/korkortlarare
|
| 46 |
```
|
| 47 |
|
| 48 |
+
Or download and create locally:
|
| 49 |
|
| 50 |
+
```bash
|
| 51 |
+
ollama create korkortlarare -f Modelfile
|
| 52 |
+
```
|
| 53 |
|
| 54 |
+
## Usage with llama.cpp
|
| 55 |
|
| 56 |
+
```bash
|
| 57 |
+
./main -m korkortlarare-f16.gguf -p "Vad innebär högerregeln?"
|
| 58 |
+
```
|
| 59 |
|
| 60 |
+
## Training
|
| 61 |
|
| 62 |
+
The model was fine-tuned using:
|
| 63 |
+
- **Framework:** Unsloth + TRL
|
| 64 |
+
- **Method:** SFT (Supervised Fine-Tuning) with LoRA
|
| 65 |
+
- **Epochs:** 5
|
| 66 |
+
- **Dataset:** Custom Swedish driving license Q&A dataset
|
| 67 |
|
| 68 |
+
## Limitations
|
| 69 |
|
| 70 |
+
- The model is specifically trained for Swedish driving license theory and may not perform well on other topics
|
| 71 |
+
- Always verify important information with official sources (Trafikverket)
|
| 72 |
+
- This is an educational tool and should not replace official study materials
|
| 73 |
|
| 74 |
+
## License
|
| 75 |
|
| 76 |
+
Apache 2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
korkortlarare-f16.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e0346b64d159f65d48a0263834a57170f6a7c39d937779a700820ad9db875efc
|
| 3 |
+
size 15238457376
|