Instructions to use architext/gptj-162M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use architext/gptj-162M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="architext/gptj-162M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("architext/gptj-162M") model = AutoModelForCausalLM.from_pretrained("architext/gptj-162M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use architext/gptj-162M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "architext/gptj-162M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "architext/gptj-162M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/architext/gptj-162M
- SGLang
How to use architext/gptj-162M 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 "architext/gptj-162M" \ --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": "architext/gptj-162M", "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 "architext/gptj-162M" \ --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": "architext/gptj-162M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use architext/gptj-162M with Docker Model Runner:
docker model run hf.co/architext/gptj-162M
Commit History
-
Update README.md
ca22411 -
Update README.md
add license and details42bf136
-
Create merges.txt
0ceafe2 -
Update config.json
74234b3 -
Update config.json
239a9f0
-
Update README.md
5a4a27c -
Update README.md
e2e3cdc -
Upload vocab.json
b8a5289 -
Delete vocab.json
b69abcc -
Upload tokenizer_config.json
4c5682a -
Delete tokenizer_config.json
53a235c -
Upload tokenizer.json
4240c99 -
Delete tokenizer.json
614f89b -
Upload special_tokens_map.json
60461e8 -
Delete special_tokens_map.json
d5e1ec2 -
Upload added_tokens.json
83df04d -
Delete added_tokens.json
0adaac8 -
Upload vocab.json
5d69d49 -
Upload tokenizer_config.json
be3cc00 -
Upload tokenizer.json
69537bc -
Upload special_tokens_map.json
ec69037 -
Upload added_tokens.json
eda28fa -
Update README.md
dff2ba1 -
Update README.md
2f50573 -
Upload pytorch_model.bin
a290c0c -
Upload config.json
55d407f
-
initial commit
483da8c