Text Generation
Transformers
PyTorch
Safetensors
gpt_bigcode
text-generation-inference
4-bit precision
gptq
Run this model with HF Jobs
Run DaertML/tiny_starcoder_py-GPTQ on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/DaertML/tiny_starcoder_py-GPTQ. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/DaertML/tiny_starcoder_py-GPTQ on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/DaertML/tiny_starcoder_py-GPTQ. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/DaertML/tiny_starcoder_py-GPTQ. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use DaertML/tiny_starcoder_py-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DaertML/tiny_starcoder_py-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DaertML/tiny_starcoder_py-GPTQ")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DaertML/tiny_starcoder_py-GPTQ") model = AutoModelForCausalLM.from_pretrained("DaertML/tiny_starcoder_py-GPTQ", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DaertML/tiny_starcoder_py-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DaertML/tiny_starcoder_py-GPTQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DaertML/tiny_starcoder_py-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/DaertML/tiny_starcoder_py-GPTQ
- SGLang
How to use DaertML/tiny_starcoder_py-GPTQ 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 "DaertML/tiny_starcoder_py-GPTQ" \ --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": "DaertML/tiny_starcoder_py-GPTQ", "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 "DaertML/tiny_starcoder_py-GPTQ" \ --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": "DaertML/tiny_starcoder_py-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use DaertML/tiny_starcoder_py-GPTQ with Docker Model Runner:
docker model run hf.co/DaertML/tiny_starcoder_py-GPTQ
Add quantized 4 bit version of the model
Browse filesFiles changed (8)
- config.jsonAdded+61
- generation_config.jsonAdded+6
- merges.txtAdded
- pytorch_model.binAdded+3
- special_tokens_map.jsonAdded+26
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+31
- vocab.jsonAdded
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061{ "_name_or_path": "./tinystarcoder", "activation_function": "gelu_pytorch_tanh", "architectures": [ "GPTBigCodeForCausalLM" ], "attention_softmax_in_fp32": true, "attn_pdrop": 0.1, "bos_token_id": 0, "embd_pdrop": 0.1, "eos_token_id": 0, "inference_runner": 0, "initializer_range": 0.02, "layer_norm_epsilon": 1e-05, "max_batch_size": null, "max_sequence_length": null, "model_type": "gpt_bigcode", "multi_query": true, "n_embd": 768, "n_head": 12, "n_inner": 3072, "n_layer": 20, "n_positions": 8192, "pad_key_length": true, "pre_allocate_kv_cache": false, "quantization_config": { "batch_size": 1, "bits": 4, "block_name_to_quantize": "transformer.h", "damp_percent": 0.1, "dataset": "wikitext2", "desc_act": false, "disable_exllama": false, "group_size": 128, "model_seqlen": 8192, "module_name_preceding_first_block": [ "transformer.wte", "transformer.wpe", "transformer.drop" ], "pad_token_id": null, "quant_method": "gptq", "sym": true, "tokenizer": null, "true_sequential": true, "use_cuda_fp16": true }, "resid_pdrop": 0.1, "scale_attention_softmax_in_fp32": true, "scale_attn_weights": true, "summary_activation": null, "summary_first_dropout": 0.1, "summary_proj_to_labels": true, "summary_type": "cls_index", "summary_use_proj": true, "torch_dtype": "float16", "transformers_version": "4.33.1", "use_cache": true, "validate_runner_input": true, "vocab_size": 49152}123456{ "_from_model_config": true, "bos_token_id": 0, "eos_token_id": 0, "transformers_version": "4.33.1"}123version https://git-lfs.github.com/spec/v1oid sha256:73ab684ed8d87ea182423c45c6e2e3e2972a184801ca7ec05ff67b5c687bff43size 1513231011234567891011121314151617181920212223242526{ "additional_special_tokens": [ "<|endoftext|>", "<fim_prefix>", "<fim_middle>", "<fim_suffix>", "<fim_pad>", "<filename>", "<gh_stars>", "<issue_start>", "<issue_comment>", "<issue_closed>", "<jupyter_start>", "<jupyter_text>", "<jupyter_code>", "<jupyter_output>", "<empty_output>", "<commit_before>", "<commit_msg>", "<commit_after>", "<reponame>" ], "bos_token": "<|endoftext|>", "eos_token": "<|endoftext|>", "unk_token": "<|endoftext|>"}12345678910111213141516171819202122232425262728293031{ "add_prefix_space": false, "additional_special_tokens": [ "<|endoftext|>", "<fim_prefix>", "<fim_middle>", "<fim_suffix>", "<fim_pad>", "<filename>", "<gh_stars>", "<issue_start>", "<issue_comment>", "<issue_closed>", "<jupyter_start>", "<jupyter_text>", "<jupyter_code>", "<jupyter_output>", "<empty_output>", "<commit_before>", "<commit_msg>", "<commit_after>", "<reponame>" ], "bos_token": "<|endoftext|>", "clean_up_tokenization_spaces": true, "eos_token": "<|endoftext|>", "model_max_length": 1000000000000000019884624838656, "tokenizer_class": "GPT2Tokenizer", "unk_token": "<|endoftext|>", "vocab_size": 49152}config.jsonAdded+61
generation_config.jsonAdded+6
merges.txtAdded
pytorch_model.binAdded+3
special_tokens_map.jsonAdded+26
tokenizer.jsonAdded
tokenizer_config.jsonAdded+31
vocab.jsonAdded