Text Generation
Transformers
Safetensors
gpt_bigcode
Generated from Trainer
text-generation-inference
Instructions to use Saini-Manisha/tinystarcoder-rlhf-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Saini-Manisha/tinystarcoder-rlhf-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Saini-Manisha/tinystarcoder-rlhf-model")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Saini-Manisha/tinystarcoder-rlhf-model") model = AutoModelForCausalLM.from_pretrained("Saini-Manisha/tinystarcoder-rlhf-model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Saini-Manisha/tinystarcoder-rlhf-model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Saini-Manisha/tinystarcoder-rlhf-model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Saini-Manisha/tinystarcoder-rlhf-model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Saini-Manisha/tinystarcoder-rlhf-model
- SGLang
How to use Saini-Manisha/tinystarcoder-rlhf-model 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 "Saini-Manisha/tinystarcoder-rlhf-model" \ --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": "Saini-Manisha/tinystarcoder-rlhf-model", "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 "Saini-Manisha/tinystarcoder-rlhf-model" \ --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": "Saini-Manisha/tinystarcoder-rlhf-model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Saini-Manisha/tinystarcoder-rlhf-model with Docker Model Runner:
docker model run hf.co/Saini-Manisha/tinystarcoder-rlhf-model
| timestamp,project_name,run_id,duration,emissions,emissions_rate,cpu_power,gpu_power,ram_power,cpu_energy,gpu_energy,ram_energy,energy_consumed,country_name,country_iso_code,region,cloud_provider,cloud_region,os,python_version,codecarbon_version,cpu_count,cpu_model,gpu_count,gpu_model,longitude,latitude,ram_total_size,tracking_mode,on_cloud,pue | |
| 2024-02-05T14:15:02,codecarbon,3c3a7e90-f65c-4746-97e9-aeb99599778b,5.3008997440338135,8.260499544757351e-07,1.5583202746014168e-07,140.0,48.984,47.14897298812867,0.0002061253322495,7.203342609882355e-05,6.932713929557594e-05,0.0003474858976439,Canada,CAN,quebec,,,Linux-5.4.0-166-generic-x86_64-with-glibc2.31,3.11.4,2.2.3,48,AMD Ryzen Threadripper 3960X 24-Core Processor,2,2 x NVIDIA GeForce RTX 3090,-71.2,46.8,125.73059463500977,machine,N,1.0 | |
| 2024-02-05T16:20:19,codecarbon,b337ca15-eccd-4931-9747-8166d80924f4,5.204237222671509,8.131744881465295e-07,1.5625238692119032e-07,140.0,49.61900000000001,47.14897298812867,0.00020236685540941026,7.163956382115683e-05,6.80632890524862e-05,0.00034206970828305327,Canada,CAN,quebec,,,Linux-5.4.0-166-generic-x86_64-with-glibc2.31,3.11.4,2.2.3,48,AMD Ryzen Threadripper 3960X 24-Core Processor,2,2 x NVIDIA GeForce RTX 3090,-71.2,46.8,125.73059463500977,machine,N,1.0 | |