Text Generation
Transformers
Safetensors
qwen3
openeurollm
long-context
256k
multilingual
instruction-tuning
sft
conversational
text-generation-inference
Instructions to use birgermoell/oellm-9b-256k-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use birgermoell/oellm-9b-256k-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="birgermoell/oellm-9b-256k-sft") 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("birgermoell/oellm-9b-256k-sft") model = AutoModelForCausalLM.from_pretrained("birgermoell/oellm-9b-256k-sft", 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
- vLLM
How to use birgermoell/oellm-9b-256k-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "birgermoell/oellm-9b-256k-sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "birgermoell/oellm-9b-256k-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/birgermoell/oellm-9b-256k-sft
- SGLang
How to use birgermoell/oellm-9b-256k-sft 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 "birgermoell/oellm-9b-256k-sft" \ --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": "birgermoell/oellm-9b-256k-sft", "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 "birgermoell/oellm-9b-256k-sft" \ --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": "birgermoell/oellm-9b-256k-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use birgermoell/oellm-9b-256k-sft with Docker Model Runner:
docker model run hf.co/birgermoell/oellm-9b-256k-sft
Download eval/niah-hex-long.json from birgermoell/oellm-9b-256k-sft: direct link, hf CLI and curl.
- Browser
- Download file 10.5 kB
-
https://huggingface.co/birgermoell/oellm-9b-256k-sft/resolve/main/eval/niah-hex-long.json
- Command line
-
hf download hf://birgermoell/oellm-9b-256k-sft/eval/niah-hex-long.json
-
curl -L -o niah-hex-long.json https://huggingface.co/birgermoell/oellm-9b-256k-sft/resolve/main/eval/niah-hex-long.json
10.5 kB
| { | |
| "model": "/scratch/project_465002530/users/bmoell/qwen35-posttrain/output/oellm9b-256k-sft-bf16", | |
| "rope_theta": 64000000.0, | |
| "max_position_embeddings": 262144, | |
| "requested_lengths": [ | |
| 8192, | |
| 32768, | |
| 131072, | |
| 262144 | |
| ], | |
| "depths_percent": [ | |
| 0, | |
| 25, | |
| 50, | |
| 75, | |
| 100 | |
| ], | |
| "max_new_tokens": 64, | |
| "results": [ | |
| { | |
| "requested_length": 8192, | |
| "target_input_length": 8192, | |
| "actual_input_tokens": 8158, | |
| "depth_percent": 0, | |
| "record_id": "record-8b002158", | |
| "secret": "NIAH-B7622D5EE25D", | |
| "filler_blocks": 122, | |
| "needle_token_index": 52, | |
| "needle_prompt_fraction": 0.006374, | |
| "answer": "NIAH-B7622D5EE25D", | |
| "strict_exact_match": true, | |
| "contains_match": true, | |
| "elapsed_seconds": 12.246 | |
| }, | |
| { | |
| "requested_length": 8192, | |
| "target_input_length": 8192, | |
| "actual_input_tokens": 8154, | |
| "depth_percent": 25, | |
| "record_id": "record-7dedf730", | |
| "secret": "NIAH-C745BD96A5D6", | |
| "filler_blocks": 122, | |
| "needle_token_index": 2030, | |
| "needle_prompt_fraction": 0.248958, | |
| "answer": "NIAH-C745BD96A5D6", | |
| "strict_exact_match": true, | |
| "contains_match": true, | |
| "elapsed_seconds": 4.736 | |
| }, | |
| { | |
| "requested_length": 8192, | |
| "target_input_length": 8192, | |
| "actual_input_tokens": 8153, | |
| "depth_percent": 50, | |
| "record_id": "record-42efa78b", | |
| "secret": "NIAH-4859184CAD75", | |
| "filler_blocks": 122, | |
| "needle_token_index": 4076, | |
| "needle_prompt_fraction": 0.499939, | |
| "answer": "42efa78b", | |
| "strict_exact_match": false, | |
| "contains_match": false, | |
| "elapsed_seconds": 2.6 | |
| }, | |
| { | |
| "requested_length": 8192, | |
| "target_input_length": 8192, | |
| "actual_input_tokens": 8155, | |
| "depth_percent": 75, | |
| "record_id": "record-6f01d6ae", | |
| "secret": "NIAH-3BF43AA1B869", | |
| "filler_blocks": 122, | |
| "needle_token_index": 6123, | |
| "needle_prompt_fraction": 0.750828, | |
| "answer": "6f01d6ae", | |
| "strict_exact_match": false, | |
| "contains_match": false, | |
| "elapsed_seconds": 2.082 | |
| }, | |
| { | |
| "requested_length": 8192, | |
| "target_input_length": 8192, | |
| "actual_input_tokens": 8154, | |
| "depth_percent": 100, | |
| "record_id": "record-c8da86af", | |
| "secret": "NIAH-0A78C2D44DC2", | |
| "filler_blocks": 122, | |
| "needle_token_index": 8102, | |
| "needle_prompt_fraction": 0.993623, | |
| "answer": "N/A", | |
| "strict_exact_match": false, | |
| "contains_match": false, | |
| "elapsed_seconds": 1.758 | |
| }, | |
| { | |
| "requested_length": 32768, | |
| "target_input_length": 32768, | |
| "actual_input_tokens": 32707, | |
| "depth_percent": 0, | |
| "record_id": "record-ff160c03", | |
| "secret": "NIAH-BCE52943FB70", | |
| "filler_blocks": 494, | |
| "needle_token_index": 51, | |
| "needle_prompt_fraction": 0.001559, | |
| "answer": "NIAH-BCE52943FB70", | |
| "strict_exact_match": true, | |
| "contains_match": true, | |
| "elapsed_seconds": 10.211 | |
| }, | |
| { | |
| "requested_length": 32768, | |
| "target_input_length": 32768, | |
| "actual_input_tokens": 32709, | |
| "depth_percent": 25, | |
| "record_id": "record-1855984e", | |
| "secret": "NIAH-7AC46E9BB40A", | |
| "filler_blocks": 494, | |
| "needle_token_index": 8236, | |
| "needle_prompt_fraction": 0.251796, | |
| "answer": "The passkey for record-1855984e is NIAH-7AC46E9BB40A.", | |
| "strict_exact_match": false, | |
| "contains_match": true, | |
| "elapsed_seconds": 12.821 | |
| }, | |
| { | |
| "requested_length": 32768, | |
| "target_input_length": 32768, | |
| "actual_input_tokens": 32707, | |
| "depth_percent": 50, | |
| "record_id": "record-524f75bb", | |
| "secret": "NIAH-DB7FD665F149", | |
| "filler_blocks": 494, | |
| "needle_token_index": 16353, | |
| "needle_prompt_fraction": 0.499985, | |
| "answer": "The passkey for record-524f75bb is NIAH-DB7FD665F149.", | |
| "strict_exact_match": false, | |
| "contains_match": true, | |
| "elapsed_seconds": 12.891 | |
| }, | |
| { | |
| "requested_length": 32768, | |
| "target_input_length": 32768, | |
| "actual_input_tokens": 32709, | |
| "depth_percent": 75, | |
| "record_id": "record-c7336bc6", | |
| "secret": "NIAH-24A960D29254", | |
| "filler_blocks": 494, | |
| "needle_token_index": 24471, | |
| "needle_prompt_fraction": 0.748143, | |
| "answer": "The passkey for record-c7336bc6 is NIAH-24A960D29254.", | |
| "strict_exact_match": false, | |
| "contains_match": true, | |
| "elapsed_seconds": 12.983 | |
| }, | |
| { | |
| "requested_length": 32768, | |
| "target_input_length": 32768, | |
| "actual_input_tokens": 32705, | |
| "depth_percent": 100, | |
| "record_id": "record-93bacde9", | |
| "secret": "NIAH-C905A6096888", | |
| "filler_blocks": 494, | |
| "needle_token_index": 32653, | |
| "needle_prompt_fraction": 0.99841, | |
| "answer": "NIAH-C905A6096888", | |
| "strict_exact_match": true, | |
| "contains_match": true, | |
| "elapsed_seconds": 10.523 | |
| }, | |
| { | |
| "requested_length": 131072, | |
| "target_input_length": 131072, | |
| "actual_input_tokens": 131044, | |
| "depth_percent": 0, | |
| "record_id": "record-275a8fbf", | |
| "secret": "NIAH-F060DF9BE3BD", | |
| "filler_blocks": 1984, | |
| "needle_token_index": 50, | |
| "needle_prompt_fraction": 0.000382, | |
| "answer": "The passkey for record-275a8fbf is NIAH-F060DF9BE3BD.", | |
| "strict_exact_match": false, | |
| "contains_match": true, | |
| "elapsed_seconds": 83.261 | |
| }, | |
| { | |
| "requested_length": 131072, | |
| "target_input_length": 131072, | |
| "actual_input_tokens": 131048, | |
| "depth_percent": 25, | |
| "record_id": "record-77a65ae3", | |
| "secret": "NIAH-51F1F58CC855", | |
| "filler_blocks": 1984, | |
| "needle_token_index": 32787, | |
| "needle_prompt_fraction": 0.250191, | |
| "answer": "The passkey for record-77a65ae3 is NIAH-51F1F58CC855.", | |
| "strict_exact_match": false, | |
| "contains_match": true, | |
| "elapsed_seconds": 84.484 | |
| }, | |
| { | |
| "requested_length": 131072, | |
| "target_input_length": 131072, | |
| "actual_input_tokens": 131045, | |
| "depth_percent": 50, | |
| "record_id": "record-ef276ebe", | |
| "secret": "NIAH-7F94A934229F", | |
| "filler_blocks": 1984, | |
| "needle_token_index": 65521, | |
| "needle_prompt_fraction": 0.499989, | |
| "answer": "The passkey for record-ef276ebe is NIAH-7F94A934229F", | |
| "strict_exact_match": false, | |
| "contains_match": true, | |
| "elapsed_seconds": 83.533 | |
| }, | |
| { | |
| "requested_length": 131072, | |
| "target_input_length": 131072, | |
| "actual_input_tokens": 131047, | |
| "depth_percent": 75, | |
| "record_id": "record-4a3ef6f4", | |
| "secret": "NIAH-CB433BE20187", | |
| "filler_blocks": 1984, | |
| "needle_token_index": 98259, | |
| "needle_prompt_fraction": 0.7498, | |
| "answer": "The passkey for record-4a3ef6f4 is NIAH-CB433BE20187.", | |
| "strict_exact_match": false, | |
| "contains_match": true, | |
| "elapsed_seconds": 84.008 | |
| }, | |
| { | |
| "requested_length": 131072, | |
| "target_input_length": 131072, | |
| "actual_input_tokens": 131045, | |
| "depth_percent": 100, | |
| "record_id": "record-311aacd4", | |
| "secret": "NIAH-956C7D5E1ACA", | |
| "filler_blocks": 1984, | |
| "needle_token_index": 130994, | |
| "needle_prompt_fraction": 0.999611, | |
| "answer": "The passkey for record-311aacd4 is NIAH-956C7D5E1ACA.", | |
| "strict_exact_match": false, | |
| "contains_match": true, | |
| "elapsed_seconds": 83.52 | |
| }, | |
| { | |
| "requested_length": 262144, | |
| "target_input_length": 262080, | |
| "actual_input_tokens": 262060, | |
| "depth_percent": 0, | |
| "record_id": "record-28709c4e", | |
| "secret": "NIAH-8D2349DA1B8B", | |
| "filler_blocks": 3969, | |
| "needle_token_index": 52, | |
| "needle_prompt_fraction": 0.000198, | |
| "answer": "The passkey for record-28709c4e is NIAH-8D2349DA1B8B.", | |
| "strict_exact_match": false, | |
| "contains_match": true, | |
| "elapsed_seconds": 269.095 | |
| }, | |
| { | |
| "requested_length": 262144, | |
| "target_input_length": 262080, | |
| "actual_input_tokens": 262059, | |
| "depth_percent": 25, | |
| "record_id": "record-524a19bf", | |
| "secret": "NIAH-337054561569", | |
| "filler_blocks": 3969, | |
| "needle_token_index": 65523, | |
| "needle_prompt_fraction": 0.250031, | |
| "answer": "The passkey for record-524a19bf is NIAH-337054561569.", | |
| "strict_exact_match": false, | |
| "contains_match": true, | |
| "elapsed_seconds": 269.044 | |
| }, | |
| { | |
| "requested_length": 262144, | |
| "target_input_length": 262080, | |
| "actual_input_tokens": 262056, | |
| "depth_percent": 50, | |
| "record_id": "record-b52bade9", | |
| "secret": "NIAH-7AFD87186345", | |
| "filler_blocks": 3969, | |
| "needle_token_index": 130994, | |
| "needle_prompt_fraction": 0.49987, | |
| "answer": "The passkey for record-b52bade9 is NIAH-7AFD87186345.", | |
| "strict_exact_match": false, | |
| "contains_match": true, | |
| "elapsed_seconds": 267.341 | |
| }, | |
| { | |
| "requested_length": 262144, | |
| "target_input_length": 262080, | |
| "actual_input_tokens": 262061, | |
| "depth_percent": 75, | |
| "record_id": "record-3e633807", | |
| "secret": "NIAH-E7814D0E171D", | |
| "filler_blocks": 3969, | |
| "needle_token_index": 196534, | |
| "needle_prompt_fraction": 0.749955, | |
| "answer": "The passkey for record-3e633807 is NIAH-E7814D0E171D.", | |
| "strict_exact_match": false, | |
| "contains_match": true, | |
| "elapsed_seconds": 269.949 | |
| }, | |
| { | |
| "requested_length": 262144, | |
| "target_input_length": 262080, | |
| "actual_input_tokens": 262057, | |
| "depth_percent": 100, | |
| "record_id": "record-f3bbed67", | |
| "secret": "NIAH-B147F7228673", | |
| "filler_blocks": 3969, | |
| "needle_token_index": 262004, | |
| "needle_prompt_fraction": 0.999798, | |
| "answer": "The passkey for record-f3bbed67 is NIAH-B147F7228673.", | |
| "strict_exact_match": false, | |
| "contains_match": true, | |
| "elapsed_seconds": 268.271 | |
| } | |
| ], | |
| "strict_exact_match_grid": { | |
| "8192": { | |
| "0": true, | |
| "25": true, | |
| "50": false, | |
| "75": false, | |
| "100": false | |
| }, | |
| "32768": { | |
| "0": true, | |
| "25": false, | |
| "50": false, | |
| "75": false, | |
| "100": true | |
| }, | |
| "131072": { | |
| "0": false, | |
| "25": false, | |
| "50": false, | |
| "75": false, | |
| "100": false | |
| }, | |
| "262144": { | |
| "0": false, | |
| "25": false, | |
| "50": false, | |
| "75": false, | |
| "100": false | |
| } | |
| } | |
| } | |