Run this model with HF Jobs
Run drh/CodeLlama-7b-SQL-ft-drh-hf 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 to fine-tune https://huggingface.co/drh/CodeLlama-7b-SQL-ft-drh-hf. 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/drh/CodeLlama-7b-SQL-ft-drh-hf 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.
Instructions to use drh/CodeLlama-7b-SQL-ft-drh-hf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use drh/CodeLlama-7b-SQL-ft-drh-hf with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("drh/CodeLlama-7b-SQL-ft-drh-hf", device_map="auto") - Notebooks
- Google Colab
- Kaggle
End of training
Browse filesFiles changed (10)
- README.mdAdded+58
- adapter_config.jsonAdded+39
- adapter_model.safetensorsAdded+3
- added_tokens.jsonAdded+4
- runs/Mar25_12-53-19_r-drh-sql-finetune-a4s2m33m-fc147-vpqef/events.out.tfevents.1742903624.r-drh-sql-finetune-a4s2m33m-fc147-vpqef.511.0Added+3
- special_tokens_map.jsonAdded+28
- tokenizer.jsonAdded
- tokenizer.modelAdded+3
- tokenizer_config.jsonAdded+99
- training_args.binAdded+3
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758---base_model: codellama/CodeLlama-7b-hflibrary_name: transformersmodel_name: CodeLlama-7b-SQL-ft-drh-hftags:- generated_from_trainer- trl- sftlicence: license---
# Model Card for CodeLlama-7b-SQL-ft-drh-hf
This model is a fine-tuned version of [codellama/CodeLlama-7b-hf](https://huggingface.co/codellama/CodeLlama-7b-hf).It has been trained using [TRL](https://github.com/huggingface/trl).
## Quick start
```pythonfrom transformers import pipeline
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"generator = pipeline("text-generation", model="drh/CodeLlama-7b-SQL-ft-drh-hf", device="cuda")output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]print(output["generated_text"])```
## Training procedure
This model was trained with SFT.
### Framework versions
- TRL: 0.16.0- Transformers: 4.50.0- Pytorch: 2.6.0- Datasets: 3.4.1- Tokenizers: 0.21.1
## Citations
Cite TRL as: ```bibtex@misc{vonwerra2022trl, title = {{TRL: Transformer Reinforcement Learning}}, author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec}, year = 2020, journal = {GitHub repository}, publisher = {GitHub}, howpublished = {\url{https://github.com/huggingface/trl}}}```123456789101112131415161718192021222324252627282930313233343536373839{ "alpha_pattern": {}, "auto_mapping": null, "base_model_name_or_path": "codellama/CodeLlama-7b-hf", "bias": "none", "corda_config": null, "eva_config": null, "exclude_modules": null, "fan_in_fan_out": false, "inference_mode": true, "init_lora_weights": true, "layer_replication": null, "layers_pattern": null, "layers_to_transform": null, "loftq_config": {}, "lora_alpha": 128, "lora_bias": false, "lora_dropout": 0.05, "megatron_config": null, "megatron_core": "megatron.core", "modules_to_save": null, "peft_type": "LORA", "r": 256, "rank_pattern": {}, "revision": null, "target_modules": [ "o_proj", "k_proj", "q_proj", "down_proj", "up_proj", "gate_proj", "v_proj" ], "task_type": "CAUSAL_LM", "trainable_token_indices": null, "use_dora": false, "use_rslora": false}123version https://git-lfs.github.com/spec/v1oid sha256:0c6226c6bfc1f8ef1ed5e3a59c636ce9a0559179a78565a2160981c729264598size 36077534961234{ "<|im_end|>": 32017, "<|im_start|>": 32016}123version https://git-lfs.github.com/spec/v1oid sha256:9a2a0943c81fe8db9254306b8f279d59a3c2b77a628794690d19a855b5c5432esize 4476812345678910111213141516171819202122232425262728{ "additional_special_tokens": [ { "content": "<|im_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, { "content": "<|im_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false } ], "bos_token": "<|im_start|>", "eos_token": "<|im_end|>", "pad_token": "<|im_end|>", "unk_token": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}123version https://git-lfs.github.com/spec/v1oid sha256:45ccb9c8b6b561889acea59191d66986d314e7cbd6a78abc6e49b139ca91c1e6size 500058123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899{ "add_bos_token": true, "add_eos_token": false, "added_tokens_decoder": { "0": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "1": { "content": "<s>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "2": { "content": "</s>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "32007": { "content": "▁<PRE>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "32008": { "content": "▁<SUF>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "32009": { "content": "▁<MID>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "32010": { "content": "▁<EOT>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "32016": { "content": "<|im_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "32017": { "content": "<|im_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "additional_special_tokens": [ "<|im_start|>", "<|im_end|>" ], "bos_token": "<|im_start|>", "chat_template": "{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}", "clean_up_tokenization_spaces": false, "eos_token": "<|im_end|>", "eot_token": "▁<EOT>", "extra_special_tokens": {}, "fill_token": "<FILL_ME>", "legacy": null, "middle_token": "▁<MID>", "model_max_length": 1000000000000000019884624838656, "pad_token": "<|im_end|>", "prefix_token": "▁<PRE>", "sp_model_kwargs": {}, "suffix_token": "▁<SUF>", "tokenizer_class": "CodeLlamaTokenizer", "unk_token": "<unk>", "use_default_system_prompt": false}123version https://git-lfs.github.com/spec/v1oid sha256:b893fc73c6642456fa00fc430ec23728c1f027bffc0c4751a8bb699a8a044b74size 5624README.mdAdded+58
adapter_config.jsonAdded+39
adapter_model.safetensorsAdded+3
added_tokens.jsonAdded+4
runs/Mar25_12-53-19_r-drh-sql-finetune-a4s2m33m-fc147-vpqef/events.out.tfevents.1742903624.r-drh-sql-finetune-a4s2m33m-fc147-vpqef.511.0Added+3
special_tokens_map.jsonAdded+28
tokenizer.jsonAdded
tokenizer.modelAdded+3
tokenizer_config.jsonAdded+99
training_args.binAdded+3