Run this model with HF Jobs
Run INC4AI/gpt-j-6B-int8-static-inc on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/INC4AI/gpt-j-6B-int8-static-inc. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/INC4AI/gpt-j-6B-int8-static-inc on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/INC4AI/gpt-j-6B-int8-static-inc. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/INC4AI/gpt-j-6B-int8-static-inc. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use INC4AI/gpt-j-6B-int8-static-inc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use INC4AI/gpt-j-6B-int8-static-inc with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="INC4AI/gpt-j-6B-int8-static-inc")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("INC4AI/gpt-j-6B-int8-static-inc") model = AutoModelForCausalLM.from_pretrained("INC4AI/gpt-j-6B-int8-static-inc", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use INC4AI/gpt-j-6B-int8-static-inc with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "INC4AI/gpt-j-6B-int8-static-inc" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "INC4AI/gpt-j-6B-int8-static-inc", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/INC4AI/gpt-j-6B-int8-static-inc
- SGLang
How to use INC4AI/gpt-j-6B-int8-static-inc 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 "INC4AI/gpt-j-6B-int8-static-inc" \ --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": "INC4AI/gpt-j-6B-int8-static-inc", "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 "INC4AI/gpt-j-6B-int8-static-inc" \ --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": "INC4AI/gpt-j-6B-int8-static-inc", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use INC4AI/gpt-j-6B-int8-static-inc with Docker Model Runner:
docker model run hf.co/INC4AI/gpt-j-6B-int8-static-inc
Model Details: INT8 GPT-J 6B
GPT-J 6B is a transformer model trained using Ben Wang's Mesh Transformer JAX. "GPT-J" refers to the class of model, while "6B" represents the number of trainable parameters.
This int8 ONNX model is generated by neural-compressor and the fp32 model can be exported with below command:
python -m transformers.onnx --model=EleutherAI/gpt-j-6B onnx_gptj/ --framework pt --opset 13 --feature=causal-lm-with-past
| Model Detail | Description |
|---|---|
| Model Authors - Company | Intel |
| Date | April 10, 2022 |
| Version | 1 |
| Type | Text Generation |
| Paper or Other Resources | - |
| License | Apache 2.0 |
| Questions or Comments | Community Tab |
| Intended Use | Description |
|---|---|
| Primary intended uses | You can use the raw model for text generation inference |
| Primary intended users | Anyone doing text generation inference |
| Out-of-scope uses | This model in most cases will need to be fine-tuned for your particular task. The model should not be used to intentionally create hostile or alienating environments for people. |
How to use
Download the model and script by cloning the repository:
git clone https://huggingface.co/Intel/gpt-j-6B-int8-static
Then you can do inference based on the model and script 'evaluation.ipynb'.
Metrics (Model Performance):
| Model | Model Size (GB) | Lambada Acc |
|---|---|---|
| FP32 | 23 | 0.7954 |
| INT8 | 6 | 0.7944 |
- Downloads last month
- 48