Text Generation
Transformers
Safetensors
code
llama
llama-2
custom_code
text-generation-inference
4-bit precision
gptq
Run this model with HF Jobs
Run TheBloke/CodeLlama-13B-Instruct-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/TheBloke/CodeLlama-13B-Instruct-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/TheBloke/CodeLlama-13B-Instruct-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/TheBloke/CodeLlama-13B-Instruct-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.
Instructions to use TheBloke/CodeLlama-13B-Instruct-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/CodeLlama-13B-Instruct-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/CodeLlama-13B-Instruct-GPTQ", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TheBloke/CodeLlama-13B-Instruct-GPTQ", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("TheBloke/CodeLlama-13B-Instruct-GPTQ", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheBloke/CodeLlama-13B-Instruct-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheBloke/CodeLlama-13B-Instruct-GPTQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheBloke/CodeLlama-13B-Instruct-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/CodeLlama-13B-Instruct-GPTQ
- SGLang
How to use TheBloke/CodeLlama-13B-Instruct-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 "TheBloke/CodeLlama-13B-Instruct-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": "TheBloke/CodeLlama-13B-Instruct-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 "TheBloke/CodeLlama-13B-Instruct-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": "TheBloke/CodeLlama-13B-Instruct-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TheBloke/CodeLlama-13B-Instruct-GPTQ with Docker Model Runner:
docker model run hf.co/TheBloke/CodeLlama-13B-Instruct-GPTQ
Initial GPTQ model commit
Browse files1Please refer to acceptable use policy: https://github.com/facebookresearch/llama/blob/main/USE_POLICY.md1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950# Llama 2 Acceptable Use PolicyMeta is committed to promoting safe and fair use of its tools and features, including Llama 2. If you access or use Llama 2, you agree to this Acceptable Use Policy (“Policy”). The most recent copy of this policy can be found at [ai.meta.com/llama/use-policy](http://ai.meta.com/llama/use-policy).## Prohibited UsesWe want everyone to use Llama 2 safely and responsibly. You agree you will not use, or allow others to use, Llama 2 to:1. Violate the law or others’ rights, including to:1. Engage in, promote, generate, contribute to, encourage, plan, incite, or further illegal or unlawful activity or content, such as:1. Violence or terrorism2. Exploitation or harm to children, including the solicitation, creation, acquisition, or dissemination of child exploitative content or failure to report Child Sexual Abuse Material3. Human trafficking, exploitation, and sexual violence4. The illegal distribution of information or materials to minors, including obscene materials, or failure to employ legally required age-gating in connection with such information or materials.5. Sexual solicitation6. Any other criminal activity2. Engage in, promote, incite, or facilitate the harassment, abuse, threatening, or bullying of individuals or groups of individuals3. Engage in, promote, incite, or facilitate discrimination or other unlawful or harmful conduct in the provision of employment, employment benefits, credit, housing, other economic benefits, or other essential goods and services4. Engage in the unauthorized or unlicensed practice of any profession including, but not limited to, financial, legal, medical/health, or related professional practices5. Collect, process, disclose, generate, or infer health, demographic, or other sensitive personal or private information about individuals without rights and consents required by applicable laws6. Engage in or facilitate any action or generate any content that infringes, misappropriates, or otherwise violates any third-party rights, including the outputs or results of any products or services using the Llama 2 Materials7. Create, generate, or facilitate the creation of malicious code, malware, computer viruses or do anything else that could disable, overburden, interfere with or impair the proper working, integrity, operation or appearance of a website or computer system2. Engage in, promote, incite, facilitate, or assist in the planning or development of activities that present a risk of death or bodily harm to individuals, including use of Llama 2 related to the following:1. Military, warfare, nuclear industries or applications, espionage, use for materials or activities that are subject to the International Traffic Arms Regulations (ITAR) maintained by the United States Department of State2. Guns and illegal weapons (including weapon development)3. Illegal drugs and regulated/controlled substances4. Operation of critical infrastructure, transportation technologies, or heavy machinery5. Self-harm or harm to others, including suicide, cutting, and eating disorders6. Any content intended to incite or promote violence, abuse, or any infliction of bodily harm to an individual3. Intentionally deceive or mislead others, including use of Llama 2 related to the following:1. Generating, promoting, or furthering fraud or the creation or promotion of disinformation2. Generating, promoting, or furthering defamatory content, including the creation of defamatory statements, images, or other content3. Generating, promoting, or further distributing spam4. Impersonating another individual without consent, authorization, or legal right5. Representing that the use of Llama 2 or outputs are human-generated6. Generating or facilitating false online engagement, including fake reviews and other means of fake online engagement4. Fail to appropriately disclose to end users any known dangers of your AI systemPlease report any violation of this Policy, software “bug,” or other problems that could lead to a violation of this Policy through one of the following means:* Reporting issues with the model: [github.com/facebookresearch/llama](http://github.com/facebookresearch/llama)* Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)* Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)* Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama: [LlamaUseReport@meta.com](mailto:LlamaUseReport@meta.com)
USE_POLICY.md+50-1