Instructions to use heegyu/kogpt-j-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use heegyu/kogpt-j-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="heegyu/kogpt-j-base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("heegyu/kogpt-j-base") model = AutoModelForCausalLM.from_pretrained("heegyu/kogpt-j-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use heegyu/kogpt-j-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "heegyu/kogpt-j-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "heegyu/kogpt-j-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/heegyu/kogpt-j-base
- SGLang
How to use heegyu/kogpt-j-base 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 "heegyu/kogpt-j-base" \ --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": "heegyu/kogpt-j-base", "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 "heegyu/kogpt-j-base" \ --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": "heegyu/kogpt-j-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use heegyu/kogpt-j-base with Docker Model Runner:
docker model run hf.co/heegyu/kogpt-j-base
gpt-j-base-v1-lr6e-4-batch8-rev1
Browse files- .gitattributes +1 -0
- config.json +5 -4
- flax_model.msgpack +3 -0
- merges.txt +1 -1
- tokenizer.json +0 -0
- tokenizer_config.json +2 -1
- vocab.json +0 -0
.gitattributes
CHANGED
|
@@ -32,3 +32,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
flax_model.msgpack filter=lfs diff=lfs merge=lfs -text
|
config.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
{
|
|
|
|
| 2 |
"activation_function": "gelu_new",
|
| 3 |
"architectures": [
|
| 4 |
"GPTJForCausalLM"
|
|
@@ -7,8 +8,6 @@
|
|
| 7 |
"bos_token_id": 1,
|
| 8 |
"embd_pdrop": 0.0,
|
| 9 |
"eos_token_id": 2,
|
| 10 |
-
"pad_token_id": 0,
|
| 11 |
-
"unk_token_id": 5,
|
| 12 |
"gradient_checkpointing": false,
|
| 13 |
"initializer_range": 0.02,
|
| 14 |
"layer_norm_epsilon": 1e-05,
|
|
@@ -18,6 +17,7 @@
|
|
| 18 |
"n_inner": null,
|
| 19 |
"n_layer": 12,
|
| 20 |
"n_positions": 1024,
|
|
|
|
| 21 |
"resid_pdrop": 0.0,
|
| 22 |
"rotary_dim": 16,
|
| 23 |
"scale_attn_weights": true,
|
|
@@ -28,7 +28,8 @@
|
|
| 28 |
"summary_use_proj": true,
|
| 29 |
"tie_word_embeddings": false,
|
| 30 |
"tokenizer_class": "GPT2Tokenizer",
|
| 31 |
-
"transformers_version": "4.
|
|
|
|
| 32 |
"use_cache": true,
|
| 33 |
"vocab_size": 51200
|
| 34 |
-
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "heegyu/kogpt-j-base",
|
| 3 |
"activation_function": "gelu_new",
|
| 4 |
"architectures": [
|
| 5 |
"GPTJForCausalLM"
|
|
|
|
| 8 |
"bos_token_id": 1,
|
| 9 |
"embd_pdrop": 0.0,
|
| 10 |
"eos_token_id": 2,
|
|
|
|
|
|
|
| 11 |
"gradient_checkpointing": false,
|
| 12 |
"initializer_range": 0.02,
|
| 13 |
"layer_norm_epsilon": 1e-05,
|
|
|
|
| 17 |
"n_inner": null,
|
| 18 |
"n_layer": 12,
|
| 19 |
"n_positions": 1024,
|
| 20 |
+
"pad_token_id": 0,
|
| 21 |
"resid_pdrop": 0.0,
|
| 22 |
"rotary_dim": 16,
|
| 23 |
"scale_attn_weights": true,
|
|
|
|
| 28 |
"summary_use_proj": true,
|
| 29 |
"tie_word_embeddings": false,
|
| 30 |
"tokenizer_class": "GPT2Tokenizer",
|
| 31 |
+
"transformers_version": "4.25.1",
|
| 32 |
+
"unk_token_id": 5,
|
| 33 |
"use_cache": true,
|
| 34 |
"vocab_size": 51200
|
| 35 |
+
}
|
flax_model.msgpack
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2c8b46abacb8ace04f4c0bdecff4272906163325784aaf8ae1de9be293949080
|
| 3 |
+
size 654785094
|
merges.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
#version: 0.2
|
| 2 |
Ġ ì
|
| 3 |
Ġ ë
|
| 4 |
ì Ŀ
|
|
|
|
| 1 |
+
#version: 0.2 - Trained by `huggingface/tokenizers`
|
| 2 |
Ġ ì
|
| 3 |
Ġ ë
|
| 4 |
ì Ŀ
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
CHANGED
|
@@ -18,7 +18,8 @@
|
|
| 18 |
"single_word": false
|
| 19 |
},
|
| 20 |
"errors": "replace",
|
| 21 |
-
"
|
|
|
|
| 22 |
"pad_token": null,
|
| 23 |
"special_tokens_map_file": null,
|
| 24 |
"tokenizer_class": "GPT2Tokenizer",
|
|
|
|
| 18 |
"single_word": false
|
| 19 |
},
|
| 20 |
"errors": "replace",
|
| 21 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 22 |
+
"name_or_path": "heegyu/kogpt-j-base",
|
| 23 |
"pad_token": null,
|
| 24 |
"special_tokens_map_file": null,
|
| 25 |
"tokenizer_class": "GPT2Tokenizer",
|
vocab.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|