Instructions to use nur-dev/gpt-j-3.4B-kaz with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nur-dev/gpt-j-3.4B-kaz with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nur-dev/gpt-j-3.4B-kaz")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nur-dev/gpt-j-3.4B-kaz") model = AutoModelForCausalLM.from_pretrained("nur-dev/gpt-j-3.4B-kaz", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nur-dev/gpt-j-3.4B-kaz with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nur-dev/gpt-j-3.4B-kaz" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nur-dev/gpt-j-3.4B-kaz", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nur-dev/gpt-j-3.4B-kaz
- SGLang
How to use nur-dev/gpt-j-3.4B-kaz 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 "nur-dev/gpt-j-3.4B-kaz" \ --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": "nur-dev/gpt-j-3.4B-kaz", "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 "nur-dev/gpt-j-3.4B-kaz" \ --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": "nur-dev/gpt-j-3.4B-kaz", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nur-dev/gpt-j-3.4B-kaz with Docker Model Runner:
docker model run hf.co/nur-dev/gpt-j-3.4B-kaz
GPT-J-3.48B-Kazakh
Kazakh Language GPT-J-3.48B
General-purpose Kazakh Language Model
Architecture: GPTJForCausalLM
Tokenizer: retrained GPT2Tokenizer (Vocabulary size: 50,400, Model Max Length: 2048)
Overview
This model is a Kazakh language variant of the GPT-J-3.48B architecture, designed for general-purpose language modeling tasks. It has been trained on a diverse set of Kazakh language texts and is intended to support various natural language processing applications in the Kazakh language.
Usage Example
The model can be used with the Hugging Face Transformers library:
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained("nur-dev/gpt-j-3.4B-kaz")
tokenizer = AutoTokenizer.from_pretrained("nur-dev/gpt-j-3.4B-kaz")
model.eval()
Training Details
The model is being trained using the DeepSpeed library with Zero Optimization Stage 2. During the training process, zero optimization is applied at stage 2, with the optimizer offloaded to the CPU and pin memory enabled. The training also includes allgather partitions with a bucket size of 200M, overlap communication, reduce scatter, an automatic reduce bucket size, and the use of contiguous gradients. Hardware: 4 NVIDIA A100 GPUs (40GB each) Training Steps: Approximately 180,000 (ongoing) Epochs: 1(ongoing) Batch Size: 2 per device (for both training and evaluation) Gradient Accumulation Steps: 4 Learning Rate: 5e-5 Weight Decay: 0.05 Learning Rate Scheduler: Cosine with Restarts Warmup Steps: 15,000 Checkpointing Steps: Every 10,000 steps
Model Authors
Name: Kadyrbek Nurgali
- Email: nurgaliqadyrbek@gmail.com
- LinkedIn: Kadyrbek Nurgali
- Downloads last month
- -