Instructions to use sr5434/chatbot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sr5434/chatbot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sr5434/chatbot")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sr5434/chatbot") model = AutoModelForCausalLM.from_pretrained("sr5434/chatbot", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sr5434/chatbot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sr5434/chatbot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sr5434/chatbot", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/sr5434/chatbot
- SGLang
How to use sr5434/chatbot 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 "sr5434/chatbot" \ --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": "sr5434/chatbot", "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 "sr5434/chatbot" \ --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": "sr5434/chatbot", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use sr5434/chatbot with Docker Model Runner:
docker model run hf.co/sr5434/chatbot
| license: mit | |
| tags: | |
| - generated_from_trainer | |
| model-index: | |
| - name: chatbot | |
| results: [] | |
| datasets: | |
| - Anthropic/hh-rlhf | |
| library_name: transformers | |
| <!-- This model card has been generated automatically according to the information the Trainer had access to. You | |
| should probably proofread and complete it, then remove this comment. --> | |
| # Chatbot | |
| This model is a fine-tuned version of [EleutherAI/gpt-neo-125M](https://huggingface.co/EleutherAI/gpt-neo-125M) on an Anthropic's HH-RLHF dataset. | |
| ## Intended uses & limitations | |
| This model is designed for research purposes only. I highly suggest not to use this in production. | |
| ## Training procedure | |
| ### Training hyperparameters | |
| The following hyperparameters were used during training: | |
| - learning_rate: 5e-05 | |
| - train_batch_size: 4 | |
| - eval_batch_size: 8 | |
| - seed: 42 | |
| - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 | |
| - lr_scheduler_type: linear | |
| - lr_scheduler_warmup_steps: 500 | |
| - num_epochs: 2 | |
| ### Tensorboard | |
| You can view data about this model in [this](https://tensorboard.dev/experiment/lgu6VRXXR1C9lndVzbl3Ng]) tensorboard. | |
| ### Framework versions | |
| - Transformers 4.26.1 | |
| - Pytorch 1.13.1+cu116 | |
| - Datasets 2.10.1 | |
| - Tokenizers 0.13.2 |