Instructions to use tokyotech-llm/Swallow-70b-NVE-instruct-hf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tokyotech-llm/Swallow-70b-NVE-instruct-hf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tokyotech-llm/Swallow-70b-NVE-instruct-hf")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("tokyotech-llm/Swallow-70b-NVE-instruct-hf") model = AutoModelForMultimodalLM.from_pretrained("tokyotech-llm/Swallow-70b-NVE-instruct-hf") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tokyotech-llm/Swallow-70b-NVE-instruct-hf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tokyotech-llm/Swallow-70b-NVE-instruct-hf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tokyotech-llm/Swallow-70b-NVE-instruct-hf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tokyotech-llm/Swallow-70b-NVE-instruct-hf
- SGLang
How to use tokyotech-llm/Swallow-70b-NVE-instruct-hf 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 "tokyotech-llm/Swallow-70b-NVE-instruct-hf" \ --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": "tokyotech-llm/Swallow-70b-NVE-instruct-hf", "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 "tokyotech-llm/Swallow-70b-NVE-instruct-hf" \ --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": "tokyotech-llm/Swallow-70b-NVE-instruct-hf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tokyotech-llm/Swallow-70b-NVE-instruct-hf with Docker Model Runner:
docker model run hf.co/tokyotech-llm/Swallow-70b-NVE-instruct-hf
Commit History
Upload README.md 34ea975 verified
Upload LICENSE.txt c767101 verified
Update config.json d2e04fa verified
Upload config.json 57f4c6f
Upload tokenizer.json a9dbbca
Upload model-00009-of-00029.safetensors 6a0ce27
Upload generation_config.json 506e960
Upload model-00003-of-00029.safetensors a058fb5
Upload model-00029-of-00029.safetensors f8c1ebc
Upload model-00002-of-00029.safetensors 20a4ff6
Upload model-00011-of-00029.safetensors e65f555
Upload model-00020-of-00029.safetensors 0781227
Upload model-00001-of-00029.safetensors 3844934
Upload model-00017-of-00029.safetensors a85ecbd
Upload model-00013-of-00029.safetensors 98bae2e
Upload model-00019-of-00029.safetensors db7ce3a
Upload model-00023-of-00029.safetensors 4079883
Upload tokenizer_config.json 1813f0f
Upload model-00007-of-00029.safetensors 86cc467
Upload model.safetensors.index.json 95138d6
Upload model-00018-of-00029.safetensors 19025c2
Upload model-00025-of-00029.safetensors bba9702
Upload model-00015-of-00029.safetensors 3c8c2ff
Upload model-00027-of-00029.safetensors a018022
Upload model-00022-of-00029.safetensors c89f9bd
Upload model-00008-of-00029.safetensors 57c203f
Upload model-00021-of-00029.safetensors d913cc7
Upload model-00014-of-00029.safetensors 26bac73
Upload model-00026-of-00029.safetensors 80f54c5
Upload model-00016-of-00029.safetensors 1a057db
Upload model-00010-of-00029.safetensors c1f77dd
Upload model-00028-of-00029.safetensors 5ea3b2c
Upload special_tokens_map.json 63bdfca
Upload model-00005-of-00029.safetensors 31d8fc3
Upload tokenizer.model 56b8376
Upload model-00024-of-00029.safetensors 26e897b
Upload model-00006-of-00029.safetensors 70cab89
Upload model-00004-of-00029.safetensors 2061e63
Upload model-00012-of-00029.safetensors 14fb41f
initial commit 6433c0a
Kazuki Fujii commited on