Text Generation
Transformers
PyTorch
Safetensors
English
llama
pretrained
mistral-common
text-generation-inference
Instructions to use chatpbc1/chatpbc-v33 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use chatpbc1/chatpbc-v33 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="chatpbc1/chatpbc-v33")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("chatpbc1/chatpbc-v33") model = AutoModelForCausalLM.from_pretrained("chatpbc1/chatpbc-v33", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use chatpbc1/chatpbc-v33 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Install mistral-common: pip install --upgrade mistral-common # Start the vLLM server: vllm serve "chatpbc1/chatpbc-v33" --tokenizer_mode mistral --config_format mistral --load_format mistral --tool-call-parser mistral --enable-auto-tool-choice # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "chatpbc1/chatpbc-v33", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/chatpbc1/chatpbc-v33
- SGLang
How to use chatpbc1/chatpbc-v33 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 "chatpbc1/chatpbc-v33" \ --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": "chatpbc1/chatpbc-v33", "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 "chatpbc1/chatpbc-v33" \ --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": "chatpbc1/chatpbc-v33", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use chatpbc1/chatpbc-v33 with Docker Model Runner:
docker model run hf.co/chatpbc1/chatpbc-v33
ChatPBC Model Deployment Checklist
Developed by Mik Tse Agency
PRE-DEPLOYMENT REQUIREMENTS
Model Repo Structure (REQUIRED for HF Inference API to work):
-
config.jsonwithmodel_typefield present -
model.safetensorsORpytorch_model.bin(actual weight files, NOT empty placeholders) -
tokenizer_config.json -
tokenizer.modelORtokenizer.json -
special_tokens_map.json -
generation_config.json -
README.mdwithpipeline_tag: text-generationin YAML front matter
-
If using LoRA adapters:
-
adapter_config.jsonwithbase_model_name_or_pathpointing to a real, accessible HF model -
adapter_model.safetensorswith actual trained weights (NOT 0.1 KB placeholder) - The base model must be publicly accessible on HF
- Use
merge_and_unload()to create a standalone model for Inference API compatibility
-
HF Inference API Requirements:
- Model repo is PUBLIC (not private)
-
pipeline_tag: text-generationset in model card YAML -
library_name: transformersset in model card YAML - Model is NOT gated/restricted
- HF Token has read access to the model
Chat Template Verification:
- Confirm
tokenizer_config.jsonhaschat_templatefield - For Llama-2 models: use
[INST]format - For Mistral/Zephyr: use
<|user|>format - For ChatML: use
<|im_start|>format - Match the prompt format in ALL code (Python, JavaScript, Gradio)
- Confirm
API Call Verification:
- Endpoint:
https://router.huggingface.co/v1/chat/completions(for router) orhttps://api-inference.huggingface.co/models/{model_id} - Headers:
Authorization: Bearer {HF_TOKEN},Content-Type: application/json - Body:
inputs(string) ormessages(array), parameters (max_new_tokens,temperature,do_sample,return_full_text: false) - Options:
wait_for_model: true(prevents immediate 503 failure) - Retry logic: 5 retries, 10 second delay between retries
- Timeout: 180 seconds minimum
- Endpoint:
Demo Verification:
- Open HTML demo in browser
- Send "Hi" — model should respond with a greeting
- Send "My business is struggling" — model should show empathy
- Send "Tell me more about what I said earlier" — model should reference earlier message
- Verify no base model names appear anywhere in the UI
- Test dark/light mode toggle
- Test model selector (V4 vs V3.3)
- Test clear conversation button
Common Errors and Fixes:
- 503 "Model is currently loading" → Add
wait_for_model: trueand retry with 20s delay - 400 "Model not supported by provider" → Model is LoRA adapter, needs
merge_and_unloador full weights - "trouble connecting" in demo → Check API endpoint URL, check HF token validity, check model is public
- Empty responses → Check
return_full_text: false, check prompt format matches tokenizer template - DNS resolution failure → Only occurs in restricted sandbox environments, not in production
- 503 "Model is currently loading" → Add
Post-Deployment Verification:
- Test API directly with curl or Python requests from a non-sandbox environment
- Verify multi-turn memory works (5 turns minimum)
- Verify model introduces itself on first message
- Verify model remembers context from turn 1 when at turn 5
- Both repos show as public on
huggingface.co/chatpbc1