Text Generation
Transformers
Safetensors
English
Japanese
mixtral
conversational
text-generation-inference
Instructions to use llm-jp/llm-jp-3-8x1.8b-instruct2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use llm-jp/llm-jp-3-8x1.8b-instruct2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="llm-jp/llm-jp-3-8x1.8b-instruct2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("llm-jp/llm-jp-3-8x1.8b-instruct2") model = AutoModelForCausalLM.from_pretrained("llm-jp/llm-jp-3-8x1.8b-instruct2", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use llm-jp/llm-jp-3-8x1.8b-instruct2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "llm-jp/llm-jp-3-8x1.8b-instruct2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "llm-jp/llm-jp-3-8x1.8b-instruct2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/llm-jp/llm-jp-3-8x1.8b-instruct2
- SGLang
How to use llm-jp/llm-jp-3-8x1.8b-instruct2 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 "llm-jp/llm-jp-3-8x1.8b-instruct2" \ --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": "llm-jp/llm-jp-3-8x1.8b-instruct2", "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 "llm-jp/llm-jp-3-8x1.8b-instruct2" \ --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": "llm-jp/llm-jp-3-8x1.8b-instruct2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use llm-jp/llm-jp-3-8x1.8b-instruct2 with Docker Model Runner:
docker model run hf.co/llm-jp/llm-jp-3-8x1.8b-instruct2
merge bf16
Browse files- config.json +1 -1
- model-00001-of-00008.safetensors → model-00001-of-00004.safetensors +2 -2
- model-00002-of-00008.safetensors → model-00002-of-00004.safetensors +2 -2
- model-00003-of-00008.safetensors → model-00003-of-00004.safetensors +2 -2
- model-00004-of-00008.safetensors → model-00004-of-00004.safetensors +2 -2
- model-00005-of-00008.safetensors +0 -3
- model-00006-of-00008.safetensors +0 -3
- model-00007-of-00008.safetensors +0 -3
- model-00008-of-00008.safetensors +0 -3
- model.safetensors.index.json +0 -0
config.json
CHANGED
|
@@ -27,7 +27,7 @@
|
|
| 27 |
"router_jitter_noise": 0.0,
|
| 28 |
"sliding_window": null,
|
| 29 |
"tie_word_embeddings": false,
|
| 30 |
-
"torch_dtype": "
|
| 31 |
"transformers_version": "4.47.0",
|
| 32 |
"use_cache": true,
|
| 33 |
"vocab_size": 99584
|
|
|
|
| 27 |
"router_jitter_noise": 0.0,
|
| 28 |
"sliding_window": null,
|
| 29 |
"tie_word_embeddings": false,
|
| 30 |
+
"torch_dtype": "bfloat16",
|
| 31 |
"transformers_version": "4.47.0",
|
| 32 |
"use_cache": true,
|
| 33 |
"vocab_size": 99584
|
model-00001-of-00008.safetensors → model-00001-of-00004.safetensors
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8276058eddf5d0546b6222d8961042ee59c73a5124c70fed5899b5b38182a45e
|
| 3 |
+
size 4988379392
|
model-00002-of-00008.safetensors → model-00002-of-00004.safetensors
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c9f72ff0b40dedfa3f2a46fbc2c26426e510c88bb0e4f82591d54421334a745a
|
| 3 |
+
size 4987299352
|
model-00003-of-00008.safetensors → model-00003-of-00004.safetensors
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b304793c4ce0026624adf204b504d1a4271fde46ea6f9099083d39b50386181e
|
| 3 |
+
size 4991535416
|
model-00004-of-00008.safetensors → model-00004-of-00004.safetensors
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:017c7a8406758569399e031d21aa0cf66062307896f23914e18cf7f8c330ffc7
|
| 3 |
+
size 3566400304
|
model-00005-of-00008.safetensors
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:bf0046e1ff49331621ff887efd3567c2361ae5234cc1bb26591190cd4506c4b6
|
| 3 |
-
size 4966397280
|
|
|
|
|
|
|
|
|
|
|
|
model-00006-of-00008.safetensors
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:b335540f2549e56250ac55e81b27e50f6922fc6f38ede19d756bf28181e8c010
|
| 3 |
-
size 4957926072
|
|
|
|
|
|
|
|
|
|
|
|
model-00007-of-00008.safetensors
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:1ec650f86412ebc68ee0c7777a22fce34e1262aacdf9d4f04582041ba55fa40d
|
| 3 |
-
size 4957926064
|
|
|
|
|
|
|
|
|
|
|
|
model-00008-of-00008.safetensors
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:14c156610f674d139e38f5972ba18dac15e70055ceaba83e6cbca83808949cdf
|
| 3 |
-
size 2351018392
|
|
|
|
|
|
|
|
|
|
|
|
model.safetensors.index.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|