Text Generation
Transformers
PyTorch
llama
code llama
Eval Results (legacy)
text-generation-inference
Run this model with HF Jobs
Run Phind/Phind-CodeLlama-34B-Python-v1 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/Phind/Phind-CodeLlama-34B-Python-v1. 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/Phind/Phind-CodeLlama-34B-Python-v1 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/Phind/Phind-CodeLlama-34B-Python-v1. 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/Phind/Phind-CodeLlama-34B-Python-v1. 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 Phind/Phind-CodeLlama-34B-Python-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Phind/Phind-CodeLlama-34B-Python-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Phind/Phind-CodeLlama-34B-Python-v1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Phind/Phind-CodeLlama-34B-Python-v1") model = AutoModelForCausalLM.from_pretrained("Phind/Phind-CodeLlama-34B-Python-v1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Phind/Phind-CodeLlama-34B-Python-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Phind/Phind-CodeLlama-34B-Python-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Phind/Phind-CodeLlama-34B-Python-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Phind/Phind-CodeLlama-34B-Python-v1
- SGLang
How to use Phind/Phind-CodeLlama-34B-Python-v1 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 "Phind/Phind-CodeLlama-34B-Python-v1" \ --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": "Phind/Phind-CodeLlama-34B-Python-v1", "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 "Phind/Phind-CodeLlama-34B-Python-v1" \ --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": "Phind/Phind-CodeLlama-34B-Python-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Phind/Phind-CodeLlama-34B-Python-v1 with Docker Model Runner:
docker model run hf.co/Phind/Phind-CodeLlama-34B-Python-v1
Ubuntu commited on
Commit ·
0d28aca
1
Parent(s): 176286a
Upload model
Browse filesFiles changed (13)
- config.jsonAdded+26
- generation_config.jsonAdded+6
- pytorch_model-00001-of-00007.binAdded+3
- pytorch_model-00002-of-00007.binAdded+3
- pytorch_model-00003-of-00007.binAdded+3
- pytorch_model-00004-of-00007.binAdded+3
- pytorch_model-00005-of-00007.binAdded+3
- pytorch_model-00006-of-00007.binAdded+3
- pytorch_model-00007-of-00007.binAdded+3
- pytorch_model.bin.index.jsonAdded+3
- special_tokens_map.jsonAdded+24
- tokenizer.modelAdded+3
- tokenizer_config.jsonAdded+37
1234567891011121314151617181920212223242526{ "_name_or_path": "/fsx/codellama-34b-python-hf", "architectures": [ "LlamaForCausalLM" ], "bos_token_id": 1, "eos_token_id": 2, "hidden_act": "silu", "hidden_size": 8192, "initializer_range": 0.02, "intermediate_size": 22016, "max_position_embeddings": 16384, "model_type": "llama", "num_attention_heads": 64, "num_hidden_layers": 48, "num_key_value_heads": 8, "pretraining_tp": 1, "rms_norm_eps": 1e-05, "rope_scaling": null, "rope_theta": 1000000, "tie_word_embeddings": false, "torch_dtype": "bfloat16", "transformers_version": "4.33.0.dev0", "use_cache": true, "vocab_size": 32000}123456{ "_from_model_config": true, "bos_token_id": 1, "eos_token_id": 2, "transformers_version": "4.33.0.dev0"}123version https://git-lfs.github.com/spec/v1oid sha256:d78f4b6851a7617164c805c13e771a3301c14a2e37650ee9145cfedc3f3149f1size 9852637497123version https://git-lfs.github.com/spec/v1oid sha256:52e3cdb3bc1efa53f86cc98a6c6f83ecdb809fbefa07820ad31f32a6773f7a27size 9689093137123version https://git-lfs.github.com/spec/v1oid sha256:96390c54166ff95792457ae8e8f425465b730b62049b8970847d3b925357f396size 9689093137123version https://git-lfs.github.com/spec/v1oid sha256:2016e60035b91c369f373f2d0e6bceba23891d64a678e0282e5d67912e6bbcffsize 9689093137123version https://git-lfs.github.com/spec/v1oid sha256:b161e7c8462223fbedc8ae2ddef6ba828865d103f75b70981912f580ab621e54size 9689093137123version https://git-lfs.github.com/spec/v1oid sha256:20d0e6ec2d066e62119723b8a27a94a1dbdf22cc20e84a49404a8665ea54fd39size 9689093137123version https://git-lfs.github.com/spec/v1oid sha256:8a14628e162938f6d15029b3b9de1c14811a3224248b85bd816cc33a8e9ae8fasize 9189985945123version https://git-lfs.github.com/spec/v1oid sha256:9a714170172282cfbcaa120af13c0df08b06d040ff24dab30229d8a010821d3dsize 35838123456789101112131415161718192021222324{ "bos_token": { "content": "<s>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }, "eos_token": { "content": "</s>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }, "pad_token": "</s>", "unk_token": { "content": "<unk>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }}123version https://git-lfs.github.com/spec/v1oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347size 49972312345678910111213141516171819202122232425262728293031323334353637{ "add_bos_token": true, "add_eos_token": false, "bos_token": { "__type": "AddedToken", "content": "<s>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }, "clean_up_tokenization_spaces": false, "eos_token": { "__type": "AddedToken", "content": "</s>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }, "legacy": null, "model_max_length": 4096, "pad_token": null, "padding_side": "right", "sp_model_kwargs": {}, "spaces_between_special_tokens": false, "tokenizer_class": "LlamaTokenizer", "unk_token": { "__type": "AddedToken", "content": "<unk>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }, "use_default_system_prompt": true}config.jsonAdded+26
generation_config.jsonAdded+6
pytorch_model-00001-of-00007.binAdded+3
pytorch_model-00002-of-00007.binAdded+3
pytorch_model-00003-of-00007.binAdded+3
pytorch_model-00004-of-00007.binAdded+3
pytorch_model-00005-of-00007.binAdded+3
pytorch_model-00006-of-00007.binAdded+3
pytorch_model-00007-of-00007.binAdded+3
pytorch_model.bin.index.jsonAdded+3
special_tokens_map.jsonAdded+24
tokenizer.modelAdded+3
tokenizer_config.jsonAdded+37