Text Generation
Transformers
Safetensors
PyTorch
English
custom_gpt
feature-extraction
gpt2
custom-architecture
tiktoken
custom_code
Instructions to use FarhanAK128/CustomGPT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FarhanAK128/CustomGPT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FarhanAK128/CustomGPT", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("FarhanAK128/CustomGPT", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use FarhanAK128/CustomGPT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FarhanAK128/CustomGPT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FarhanAK128/CustomGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/FarhanAK128/CustomGPT
- SGLang
How to use FarhanAK128/CustomGPT 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 "FarhanAK128/CustomGPT" \ --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": "FarhanAK128/CustomGPT", "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 "FarhanAK128/CustomGPT" \ --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": "FarhanAK128/CustomGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use FarhanAK128/CustomGPT with Docker Model Runner:
docker model run hf.co/FarhanAK128/CustomGPT
Update README.md
Browse files
README.md
CHANGED
|
@@ -15,7 +15,7 @@ library_name: transformers
|
|
| 15 |
|
| 16 |
## Model Summary
|
| 17 |
|
| 18 |
-
**CustomGPT** is an LLM which is built, train, instruction-finetuned from scratch and evaluated using the LLM-as-a-judge method. This project shows my learning about developing a custom LLM architecture from scratch and its deployment
|
| 19 |
|
| 20 |
This model is fully compatible with the Hugging Face `transformers` ecosystem and can be loaded using `AutoModel.from_pretrained`.
|
| 21 |
|
|
|
|
| 15 |
|
| 16 |
## Model Summary
|
| 17 |
|
| 18 |
+
**CustomGPT** is an LLM which is built, train, instruction-finetuned from scratch and evaluated using the LLM-as-a-judge method. This project shows my learning about developing a custom LLM architecture from scratch and its deployment on huggingface. It should be noted that this model is not to be used in production as it only for demo purpose which showcases my learning of LLM engineering. GPT pretrained weights have been used which are further fine-tuned on a small instruction dataset.
|
| 19 |
|
| 20 |
This model is fully compatible with the Hugging Face `transformers` ecosystem and can be loaded using `AutoModel.from_pretrained`.
|
| 21 |
|