Instructions to use stabilityai/japanese-stablelm-2-instruct-1_6b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use stabilityai/japanese-stablelm-2-instruct-1_6b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="stabilityai/japanese-stablelm-2-instruct-1_6b", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("stabilityai/japanese-stablelm-2-instruct-1_6b", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use stabilityai/japanese-stablelm-2-instruct-1_6b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "stabilityai/japanese-stablelm-2-instruct-1_6b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "stabilityai/japanese-stablelm-2-instruct-1_6b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/stabilityai/japanese-stablelm-2-instruct-1_6b
- SGLang
How to use stabilityai/japanese-stablelm-2-instruct-1_6b 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 "stabilityai/japanese-stablelm-2-instruct-1_6b" \ --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": "stabilityai/japanese-stablelm-2-instruct-1_6b", "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 "stabilityai/japanese-stablelm-2-instruct-1_6b" \ --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": "stabilityai/japanese-stablelm-2-instruct-1_6b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use stabilityai/japanese-stablelm-2-instruct-1_6b with Docker Model Runner:
docker model run hf.co/stabilityai/japanese-stablelm-2-instruct-1_6b
License
Hi,
Thanks for releasing such compact but powerful models ever!
I would like to ask you an interpretation of a license of "augmxnt/ultra-orca-boros-en-ja-v1" that you used to train the instruction model.
The dataset contains a portion from airoboros as you can see "source" colomn of the dataset.
The developer of airoboros clearly described as follows.Also note that the data was generated primarily with gpt-4, and therefore may have some strings attached to the OpenAI terms of service.
So, I think "augmxnt/ultra-orca-boros-en-ja-v1" dataset cannot use to develop any large language models because this contains the outputs from gpt-4, even releasing apache-2.0.
In these days, when LLM development has become so advanced, I sympathize with the fact that it is becoming more and more difficult to strictly adhere to those terms of use. This is just my opinion.
If you have some insights to deal with a kind of license problem, it would be glad to share in this community.