Text Generation
Transformers
Safetensors
gpt2
catalan
natural-language-processing
text-generation-inference
Instructions to use baiges/CatGPT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use baiges/CatGPT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="baiges/CatGPT")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("baiges/CatGPT") model = AutoModelForCausalLM.from_pretrained("baiges/CatGPT") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use baiges/CatGPT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "baiges/CatGPT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "baiges/CatGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/baiges/CatGPT
- SGLang
How to use baiges/CatGPT 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 "baiges/CatGPT" \ --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": "baiges/CatGPT", "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 "baiges/CatGPT" \ --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": "baiges/CatGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use baiges/CatGPT with Docker Model Runner:
docker model run hf.co/baiges/CatGPT
Upload model
Browse files- README.md +1 -1
- config.json +1 -0
- model.safetensors +1 -1
README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
|
|
|
| 3 |
tags:
|
| 4 |
- catalan
|
| 5 |
- natural-language-processing
|
| 6 |
- text-generation
|
| 7 |
- gpt2
|
| 8 |
-
license: mit
|
| 9 |
---
|
| 10 |
|
| 11 |
# Model Card for CatGPT
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
license: mit
|
| 4 |
tags:
|
| 5 |
- catalan
|
| 6 |
- natural-language-processing
|
| 7 |
- text-generation
|
| 8 |
- gpt2
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
# Model Card for CatGPT
|
config.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
{
|
|
|
|
| 2 |
"activation_function": "gelu_new",
|
| 3 |
"architectures": [
|
| 4 |
"GPT2LMHeadModel"
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "models/final_model",
|
| 3 |
"activation_function": "gelu_new",
|
| 4 |
"architectures": [
|
| 5 |
"GPT2LMHeadModel"
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 444048000
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aca488b3a34599938d4d60881ed94d9bdd771e69ee9e14445f200ce4f813967b
|
| 3 |
size 444048000
|