Instructions to use LumiOpen/Viking-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LumiOpen/Viking-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LumiOpen/Viking-7B")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LumiOpen/Viking-7B") model = AutoModelForCausalLM.from_pretrained("LumiOpen/Viking-7B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LumiOpen/Viking-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LumiOpen/Viking-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LumiOpen/Viking-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LumiOpen/Viking-7B
- SGLang
How to use LumiOpen/Viking-7B 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 "LumiOpen/Viking-7B" \ --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": "LumiOpen/Viking-7B", "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 "LumiOpen/Viking-7B" \ --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": "LumiOpen/Viking-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LumiOpen/Viking-7B with Docker Model Runner:
docker model run hf.co/LumiOpen/Viking-7B
Commit History
-
Update README.md
Verified signatureefee9d2
-
minor update
jonabur6e93406 -
update for final checkpoint
jonabur21dbecf
-
2000B
jonabur17b86f2 -
1900B
jonabur2dd6c2a -
1800B
jonabur5d4195a -
1700B
jonabur75f7af1 -
1600B
jonabur352f674 -
1500B
jonabur887c840 -
1400B
jonabur32370a5 -
1300B
jonabur6c19b8d
-
add README.md
jonabur084dfbe
-
1000B
jonaburc1e7853
-
update readme
jonabur673653b -
900B
jonaburbbfb1fe -
800B
jonabur480b578 -
700B
jonabur999953f -
600B
jonabur8475766 -
500B
jonabur648504c -
400B
jonabur53f8564 -
300B
jonabur961b5d1 -
200B
jonabur3300bd4 -
100B
jonaburd211bc8 -
initial commit
Verified signature7706b8d