Instructions to use togethercomputer/GPT-JT-Moderation-6B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use togethercomputer/GPT-JT-Moderation-6B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="togethercomputer/GPT-JT-Moderation-6B")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("togethercomputer/GPT-JT-Moderation-6B") model = AutoModelForCausalLM.from_pretrained("togethercomputer/GPT-JT-Moderation-6B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use togethercomputer/GPT-JT-Moderation-6B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "togethercomputer/GPT-JT-Moderation-6B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "togethercomputer/GPT-JT-Moderation-6B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/togethercomputer/GPT-JT-Moderation-6B
- SGLang
How to use togethercomputer/GPT-JT-Moderation-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 "togethercomputer/GPT-JT-Moderation-6B" \ --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": "togethercomputer/GPT-JT-Moderation-6B", "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 "togethercomputer/GPT-JT-Moderation-6B" \ --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": "togethercomputer/GPT-JT-Moderation-6B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use togethercomputer/GPT-JT-Moderation-6B with Docker Model Runner:
docker model run hf.co/togethercomputer/GPT-JT-Moderation-6B
Update README.md
Browse files
README.md
CHANGED
|
@@ -53,8 +53,7 @@ Output:
|
|
| 53 |
|
| 54 |
- [allenai/prosocial-dialog](https://huggingface.co/datasets/allenai/prosocial-dialog).
|
| 55 |
- A small subset of [OpenChat](https://huggingface.co/togethercomputer/OpenChaT)'s data to augment `casual` queries.
|
| 56 |
-
|
| 57 |
-
The processed data can be found [here](https://drive.google.com/file/d/1ui4SuOYXyoq-5gVEC1NXwzJxs3hwaw0Y/view?usp=drivesdk).
|
| 58 |
|
| 59 |
**Training Procedure**
|
| 60 |
|
|
@@ -63,6 +62,3 @@ The processed data can be found [here](https://drive.google.com/file/d/1ui4SuOYX
|
|
| 63 |
- **Gradient Accumulations**: 1
|
| 64 |
- **Batch:** 16 x 4 = 64
|
| 65 |
- **Learning rate:** warmup to 1e-5 for 100 steps and then kept constant
|
| 66 |
-
|
| 67 |
-
## Evaluation Results
|
| 68 |
-
\[TODO\]
|
|
|
|
| 53 |
|
| 54 |
- [allenai/prosocial-dialog](https://huggingface.co/datasets/allenai/prosocial-dialog).
|
| 55 |
- A small subset of [OpenChat](https://huggingface.co/togethercomputer/OpenChaT)'s data to augment `casual` queries.
|
| 56 |
+
- The processed data can be found [here](https://drive.google.com/file/d/1ui4SuOYXyoq-5gVEC1NXwzJxs3hwaw0Y/view?usp=drivesdk).
|
|
|
|
| 57 |
|
| 58 |
**Training Procedure**
|
| 59 |
|
|
|
|
| 62 |
- **Gradient Accumulations**: 1
|
| 63 |
- **Batch:** 16 x 4 = 64
|
| 64 |
- **Learning rate:** warmup to 1e-5 for 100 steps and then kept constant
|
|
|
|
|
|
|
|
|