Text Generation
Transformers
Safetensors
German
English
hanse
causal-lm
custom-code
research
custom_code
Instructions to use Evicka/HanseLM-78M-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Evicka/HanseLM-78M-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Evicka/HanseLM-78M-Base", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Evicka/HanseLM-78M-Base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Evicka/HanseLM-78M-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Evicka/HanseLM-78M-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Evicka/HanseLM-78M-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Evicka/HanseLM-78M-Base
- SGLang
How to use Evicka/HanseLM-78M-Base 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 "Evicka/HanseLM-78M-Base" \ --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": "Evicka/HanseLM-78M-Base", "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 "Evicka/HanseLM-78M-Base" \ --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": "Evicka/HanseLM-78M-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Evicka/HanseLM-78M-Base with Docker Model Runner:
docker model run hf.co/Evicka/HanseLM-78M-Base
Download evaluation/behavior-checks.json from Evicka/HanseLM-78M-Base: direct link, hf CLI and curl.
- Browser
- Download file 1.73 kB
-
https://huggingface.co/Evicka/HanseLM-78M-Base/resolve/main/evaluation/behavior-checks.json
- Command line
-
hf download hf://Evicka/HanseLM-78M-Base/evaluation/behavior-checks.json
-
curl -L -o behavior-checks.json https://huggingface.co/Evicka/HanseLM-78M-Base/resolve/main/evaluation/behavior-checks.json
1.73 kB
| { | |
| "seed_base": 2026, | |
| "sampling": { | |
| "temperature": 0.8, | |
| "top_k": 50, | |
| "max_new_tokens": 48 | |
| }, | |
| "samples": [ | |
| { | |
| "label": "de", | |
| "prompt": "Die Hansestadt Hamburg liegt im Norden Deutschlands und", | |
| "completion": " liegt im Norden Englands. Die Stadt ist in beide Richtungen durch den Rhein und den Rhein erreichbar und ermöglicht eine sehr individuelle Ausgestaltung und eine Vielzahl an Möglichkeiten, die sich auch in einem guten Umfeld widerspiegeln.\n\n## Geschichte\n", | |
| "new_tokens": 48, | |
| "repeated_3gram_fraction": 0.0 | |
| }, | |
| { | |
| "label": "de", | |
| "prompt": "Am frühen Morgen lag Nebel über dem Hafen.", | |
| "completion": " Die Sonne riss und er hatte keine Angst vor der Stadt.\nAm Morgen war die Sonne auf dem Flussboden noch immer voll und die Sonne kam auf.\nAls sie noch zu der gegenüberliegenden, aber sehr ruhigen Bucht von Liff", | |
| "new_tokens": 48, | |
| "repeated_3gram_fraction": 0.0 | |
| }, | |
| { | |
| "label": "en", | |
| "prompt": "The old harbor was quiet until", | |
| "completion": " they pulled out and took a look at the two hailed him.\nHe made the money and the mother put them on the bottom of the house for a f", | |
| "new_tokens": 48, | |
| "repeated_3gram_fraction": 0.0 | |
| }, | |
| { | |
| "label": "mixed", | |
| "prompt": "In Hamburg beginnt die Geschichte, but then", | |
| "completion": " the city is a little nasty.\nThe last exception of this city is the catastrophe. The ballard game of the middle class. A defence of c", | |
| "new_tokens": 48, | |
| "repeated_3gram_fraction": 0.0217 | |
| } | |
| ], | |
| "context_smoke": { | |
| "length": 2048, | |
| "shape": [ | |
| 1, | |
| 2048, | |
| 24576 | |
| ], | |
| "finite": true | |
| } | |
| } | |