Instructions to use LumiOpen/Viking-33B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LumiOpen/Viking-33B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LumiOpen/Viking-33B")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LumiOpen/Viking-33B") model = AutoModelForCausalLM.from_pretrained("LumiOpen/Viking-33B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LumiOpen/Viking-33B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LumiOpen/Viking-33B" # 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-33B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LumiOpen/Viking-33B
- SGLang
How to use LumiOpen/Viking-33B 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-33B" \ --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-33B", "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-33B" \ --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-33B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LumiOpen/Viking-33B with Docker Model Runner:
docker model run hf.co/LumiOpen/Viking-33B
jonabur commited on
Commit ·
445d7ab
1
Parent(s): 099eb30
1600B
Browse filesFiles changed (16)
- config.json+1-2
- generation_config.json-1
- model-00001-of-00014.safetensors+1-1
- model-00002-of-00014.safetensors+1-1
- model-00003-of-00014.safetensors+1-1
- model-00004-of-00014.safetensors+1-1
- model-00005-of-00014.safetensors+1-1
- model-00006-of-00014.safetensors+1-1
- model-00007-of-00014.safetensors+1-1
- model-00008-of-00014.safetensors+1-1
- model-00009-of-00014.safetensors+1-1
- model-00010-of-00014.safetensors+1-1
- model-00011-of-00014.safetensors+1-1
- model-00012-of-00014.safetensors+1-1
- model-00013-of-00014.safetensors+1-1
- model-00014-of-00014.safetensors+1-1
1234511 unmodified lines17181920212223{"_name_or_path": "/scratch/project_462000353/viking-checkpoints/converted_models/viking_v2_33B_iter_0358000_bfloat16","architectures": ["LlamaForCausalLM"],11 unmodified lines"num_attention_heads": 56,"num_hidden_layers": 56,"num_key_value_heads": 8,"pad_token_id": -1,"pretraining_tp": 1,"rms_norm_eps": 1e-05,"rope_scaling": null,1234511 unmodified lines171819202122{"_name_or_path": "/scratch/project_462000353/viking-checkpoints/converted_models/viking_v2_33B_iter_0382000_bfloat16","architectures": ["LlamaForCausalLM"],11 unmodified lines"num_attention_heads": 56,"num_hidden_layers": 56,"num_key_value_heads": 8,"pretraining_tp": 1,"rms_norm_eps": 1e-05,"rope_scaling": null,
1 unmodified line2345671 unmodified line"_from_model_config": true,"bos_token_id": 1,"eos_token_id": 2,"pad_token_id": -1,"transformers_version": "4.37.2"}1 unmodified line234561 unmodified line"_from_model_config": true,"bos_token_id": 1,"eos_token_id": 2,"transformers_version": "4.37.2"}
123version https://git-lfs.github.com/spec/v1oid sha256:25eb806e618fb637f353493b745acf9fd2e514db3bdb88f34de965e04c071430size 4932561768123version https://git-lfs.github.com/spec/v1oid sha256:4321d05c0c195ab80038336e09d78ac24d725a0bf3c33b944ef96521f1e63af0size 4932561768
123version https://git-lfs.github.com/spec/v1oid sha256:878c98b40d8d9e45c1ea30aedf610e78ab6f9d7588b43b82c66962ddacee8443size 4991370120123version https://git-lfs.github.com/spec/v1oid sha256:dac297271d45948778a5115e46555091205bc4ab834fe1636f1af7b88f7b6922size 4991370120
123version https://git-lfs.github.com/spec/v1oid sha256:dc55f0ec884a2a61476f98cfb712d70fa23857645318bdbe82855e6f42927a24size 4756459736123version https://git-lfs.github.com/spec/v1oid sha256:0bacafb68f76f2c3f907c5fd3c29212985fbc59abac520ff94295fb8af14a2a8size 4756459736
123version https://git-lfs.github.com/spec/v1oid sha256:91496988aad04d7dc40784a86ac932f16b40ec7524053b3245898d7145807e66size 4756459760123version https://git-lfs.github.com/spec/v1oid sha256:f3f7176607322a3fea401ac0c4931279890e8f9998ff81245b713ca3b3e5c0bdsize 4756459760
123version https://git-lfs.github.com/spec/v1oid sha256:cb25982ebbccb0b84cd04e6db5d9cb562be573230a72fa9dd32a4bd475f610a2size 4991370160123version https://git-lfs.github.com/spec/v1oid sha256:b341b0adccd13e37a6354665c36257a3da68d430884685654af6d54e423886ddsize 4991370160
123version https://git-lfs.github.com/spec/v1oid sha256:b684b885fb82cd44ff477163254ca0d2d88115c34aa439cab084c3ba323aff1esize 4756459760123version https://git-lfs.github.com/spec/v1oid sha256:db725c9281ebcbc49e7162afcad539df00f354b24a8250b9da4d8e2131725b97size 4756459760
123version https://git-lfs.github.com/spec/v1oid sha256:9a3e9d969e9f50af2a340c452e62298d1781aa1c3c5a281ec316a8f44798494csize 4756459760123version https://git-lfs.github.com/spec/v1oid sha256:85484859a29278a818163e72dcf50a358b41cc23ba05662d2e0b8662c4395e6dsize 4756459760
123version https://git-lfs.github.com/spec/v1oid sha256:3b080733acbfa8739dc922ffc69ba2c85ee4e76a80487bd2673b171cd7173942size 4991370160123version https://git-lfs.github.com/spec/v1oid sha256:be700a5b02fa9deaa8954b39a296b1b68c1963121110dd527e0e56da567b51bbsize 4991370160
123version https://git-lfs.github.com/spec/v1oid sha256:4121b45d6fb4a98347bde63e43a6c8a9dd2591d2a8c678c3effe7b6ab88b63a1size 4756459760123version https://git-lfs.github.com/spec/v1oid sha256:05b0431b0d97b32ad804b5e65c795c9d03bcae31bce49f51763f2e622b6b4f2asize 4756459760
123version https://git-lfs.github.com/spec/v1oid sha256:6c3d68fcc1654de3ef8678ab58c4506b045693361f4f895ba53c09b690112362size 4756459760123version https://git-lfs.github.com/spec/v1oid sha256:d42c3b70b7d13be9f04825e77c3cce54412bd44f68065421549f98eb2430fd7bsize 4756459760
123version https://git-lfs.github.com/spec/v1oid sha256:7295914cbc6f1a075cb29443dfdbe6146c9649a31706dd7afce1cff32603b578size 4991370160123version https://git-lfs.github.com/spec/v1oid sha256:5a97975ce47aba17050d575af00fd0fa03a78181cc08b35d9e21969359f56345size 4991370160
123version https://git-lfs.github.com/spec/v1oid sha256:2e3421a611d0e4e2b450aae4b3b94d2d7211191c6f60904951e514831c8bfbb3size 4756459760123version https://git-lfs.github.com/spec/v1oid sha256:df3f7e045f8f9b142d98c44c57920d9b5888eb6c12a205329d078d8964925cd1size 4756459760
123version https://git-lfs.github.com/spec/v1oid sha256:7cd918faae6329df5e1e958e652b78b89b60f5ddff9cdc5f063e0f4f28487d26size 4756459760123version https://git-lfs.github.com/spec/v1oid sha256:8454cb54f4177611738961d604e97d16eb17a3f0b5ec8212c08ef6db869fd733size 4756459760
123version https://git-lfs.github.com/spec/v1oid sha256:e0de1a10d0357736521d8e186df81361365115df6ca2e02fd999b4bfce4c22e7size 3288407640123version https://git-lfs.github.com/spec/v1oid sha256:261f6b76ca363f8db89c68178503842cd01b1808953ce82a913cfdee4b00b29bsize 3288407640
config.json+1-2
generation_config.json-1
model-00001-of-00014.safetensors+1-1
model-00002-of-00014.safetensors+1-1
model-00003-of-00014.safetensors+1-1
model-00004-of-00014.safetensors+1-1
model-00005-of-00014.safetensors+1-1
model-00006-of-00014.safetensors+1-1
model-00007-of-00014.safetensors+1-1
model-00008-of-00014.safetensors+1-1
model-00009-of-00014.safetensors+1-1
model-00010-of-00014.safetensors+1-1
model-00011-of-00014.safetensors+1-1
model-00012-of-00014.safetensors+1-1
model-00013-of-00014.safetensors+1-1
model-00014-of-00014.safetensors+1-1