Text Generation
Transformers
Safetensors
code
t5
text2text-generation
code-generation
bug-fixing
code-repair
codet5
debugging
text-generation-inference
Instructions to use Sagar123x/brainbug with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sagar123x/brainbug with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Sagar123x/brainbug")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Sagar123x/brainbug") model = AutoModelForSeq2SeqLM.from_pretrained("Sagar123x/brainbug", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Sagar123x/brainbug with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Sagar123x/brainbug" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Sagar123x/brainbug", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Sagar123x/brainbug
- SGLang
How to use Sagar123x/brainbug 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 "Sagar123x/brainbug" \ --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": "Sagar123x/brainbug", "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 "Sagar123x/brainbug" \ --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": "Sagar123x/brainbug", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Sagar123x/brainbug with Docker Model Runner:
docker model run hf.co/Sagar123x/brainbug
| { | |
| "test_examples": 500, | |
| "exact_match_accuracy": 0.026, | |
| "token_level_accuracy": 0.285153605015674, | |
| "average_similarity": 0.7674964928099656, | |
| "sample_predictions": [ | |
| { | |
| "input": "def worker(args):\\n env = os.environ.copy()\\n env['AIRFLOW_HOME'] = settings.AIRFLOW_HOME\\n ...", | |
| "prediction": "def worker(args):\\n env = os.environ.copy()\\n env['AIRFLOW_HOME'] = settings.AIRFLOW_HOME\\n ...", | |
| "expected": "def worker(args):\\n env = os.environ.copy()\\n env['AIRFLOW_HOME'] = settings.AIRFLOW_HOME\\n ...", | |
| "similarity": 0.7953776775648252 | |
| }, | |
| { | |
| "input": "def login(request):\\n\\tform = forms.PasswordLoginForm()\\n\\tmagic_form = forms.EmailLoginForm()\\n\\tif...", | |
| "prediction": "def login(request):\\n\\tform = forms.PasswordLoginForm()\\n\\tmagic_form = forms.EmailLoginForm()\\n\\tif...", | |
| "expected": "def login(request):\\n\\tform = forms.PasswordLoginForm()\\n\\tmagic_form = forms.EmailLoginForm()\\n\\tif...", | |
| "similarity": 0.7876712328767124 | |
| }, | |
| { | |
| "input": "def CFUNCTYPE(restype, *argtypes):\\n try:\\n return _c_functype_cache[(restype, argtypes)]\\...", | |
| "prediction": "def CFUNCTYPE(restype, *argtypes):\\n try:\\n return _c_functype_cache[(restype, argtypes)]\\...", | |
| "expected": "def CFUNCTYPE(restype, *argtypes, **kw):\\n flags = _FUNCFLAG_CDECL\\n if kw.pop(\"use_errno\", Fa...", | |
| "similarity": 0.5237776289350301 | |
| }, | |
| { | |
| "input": "def _output_field_or_none(self):\\n if self._output_field is None:\\n self._output_f...", | |
| "prediction": "def _output_field_or_none(self):\\n if self._output_field is None:\\n return self._r...", | |
| "expected": "def _output_field_or_none(self):\\n try:\\n return self.output_field\\n except...", | |
| "similarity": 0.6494252873563219 | |
| }, | |
| { | |
| "input": "def maybe_send_to_registration(\\n\\trequest: HttpRequest,\\n\\temail: str,\\n\\tfull_name: str = \"\",\\n\\tm...", | |
| "prediction": "def maybe_send_to_registration(\\n\\trequest: HttpRequest,\\n\\temail: str,\\n\\tfull_name: str = \"\",\\n\\tm...", | |
| "expected": "def maybe_send_to_registration(\\n\\trequest: HttpRequest,\\n\\temail: str,\\n\\tfull_name: str = \"\",\\n\\tm...", | |
| "similarity": 0.8963051251489869 | |
| } | |
| ] | |
| } |