Instructions to use itsme-nishanth/JAT-GPT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use itsme-nishanth/JAT-GPT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="itsme-nishanth/JAT-GPT")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("itsme-nishanth/JAT-GPT") model = AutoModelForCausalLM.from_pretrained("itsme-nishanth/JAT-GPT") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use itsme-nishanth/JAT-GPT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "itsme-nishanth/JAT-GPT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "itsme-nishanth/JAT-GPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/itsme-nishanth/JAT-GPT
- SGLang
How to use itsme-nishanth/JAT-GPT 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 "itsme-nishanth/JAT-GPT" \ --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": "itsme-nishanth/JAT-GPT", "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 "itsme-nishanth/JAT-GPT" \ --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": "itsme-nishanth/JAT-GPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use itsme-nishanth/JAT-GPT with Docker Model Runner:
docker model run hf.co/itsme-nishanth/JAT-GPT
π§ JAT-GPT: Just Another Tiny GPT
Welcome to JAT-GPT, the world's most underwhelming large language model β clocking in at a mighty 17.9 million parameters (yes, million, not billion β stop laughing).
π¦ Model Details
- Model type: GPT2-based decoder-only transformer
- Architecture: GPT-2
- Library: Hugging Face π€ Transformers
- Parameters: 17.9 million (size isn't everything... right?)
- Training Objective: Learn to predict the next word β and sometimes even the right one!
- Pretrained on: A secret* dataset (*"secret" means the dataset was just some text I could find lying around)
- Training Purpose: Solely educational. Also for flexing on friends who havenβt trained a language model from scratch.
π Capabilities
- Can generate small sentences
- "Please lower your expectations."
- Can hallucinate confidently, but in a very short and polite way.
- Can generate random words after few tokens.
π Limitations
- Not very smart.
- Only Pretrained.
- Understands context... if it fits within few tokens.
- Cannot replace ChatGPT. (But look how cute it is!)
π€· Why Train This?
"Because I could." β :-)
- To understand the internals of language modeling.
- To cry less when training real models later.
- To appreciate just how powerful modern LLMs are by comparison.
π οΈ Usage
from transformers import GPT2Tokenizer, GPT2LMHeadModel
tokenizer = GPT2Tokenizer.from_pretrained("itsme-nishanth/JAT-GPT")
model = GPT2LMHeadModel.from_pretrained("itsme-nishanth/JAT-GPT")
input_ids = tokenizer.encode("Once upon a time", return_tensors="pt")
output = model.generate(input_ids, max_length=20, do_sample=True)
print(tokenizer.decode(output[0]))
- Downloads last month
- 14