Run this model with HF Jobs
Run kyryl-opens-ml/duckdb-text2sql-codellama 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/kyryl-opens-ml/duckdb-text2sql-codellama. 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/kyryl-opens-ml/duckdb-text2sql-codellama 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 kyryl-opens-ml/duckdb-text2sql-codellama with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use kyryl-opens-ml/duckdb-text2sql-codellama with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("codellama/CodeLlama-7b-hf") model = PeftModel.from_pretrained(base_model, "kyryl-opens-ml/duckdb-text2sql-codellama") - Notebooks
- Google Colab
- Kaggle
Model save
Browse filesFiles changed (11)
- README.mdAdded+61
- adapter_config.jsonAdded+32
- adapter_model.safetensorsAdded+3
- added_tokens.jsonAdded+4
- all_results.jsonAdded+7
- special_tokens_map.jsonAdded+28
- tokenizer.jsonAdded
- tokenizer.modelAdded+3
- tokenizer_config.jsonAdded+98
- train_results.jsonAdded+7
- training_args.binAdded+3
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061---license: llama2library_name: pefttags:- trl- sft- generated_from_trainerbase_model: codellama/CodeLlama-7b-hfdatasets:- generatormodel-index:- name: duckdb-text2sql-codellama results: []---
<!-- This model card has been generated automatically according to the information the Trainer had access to. Youshould probably proofread and complete it, then remove this comment. -->
# duckdb-text2sql-codellama
This model is a fine-tuned version of [codellama/CodeLlama-7b-hf](https://huggingface.co/codellama/CodeLlama-7b-hf) on the generator dataset.
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:- learning_rate: 0.0002- train_batch_size: 2- eval_batch_size: 8- seed: 42- gradient_accumulation_steps: 4- total_train_batch_size: 8- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: constant- lr_scheduler_warmup_ratio: 0.03- num_epochs: 0.0001
### Training results
### Framework versions
- PEFT 0.8.2- Transformers 4.38.2- Pytorch 2.1.0+cu118- Datasets 2.16.1- Tokenizers 0.15.21234567891011121314151617181920212223242526272829303132{ "alpha_pattern": {}, "auto_mapping": null, "base_model_name_or_path": "codellama/CodeLlama-7b-hf", "bias": "none", "fan_in_fan_out": false, "inference_mode": true, "init_lora_weights": true, "layers_pattern": null, "layers_to_transform": null, "loftq_config": {}, "lora_alpha": 128, "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", "gate_proj", "v_proj", "q_proj", "k_proj", "up_proj", "down_proj" ], "task_type": "CAUSAL_LM", "use_rslora": false}123version https://git-lfs.github.com/spec/v1oid sha256:d394ac552cb1dd3a47bf1f1f1b08935be56350eadd7e36a39bbd041b8deeab3dsize 18039079841234{ "<|im_end|>": 32017, "<|im_start|>": 32016}1234567{ "epoch": 0.0, "train_loss": 0.9373413324356079, "train_runtime": 26.737, "train_samples_per_second": 0.022, "train_steps_per_second": 0.037}12345678910111213141516171819202122232425262728{ "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 5000581234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798{ "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>", "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}1234567{ "epoch": 0.0, "train_loss": 0.9373413324356079, "train_runtime": 26.737, "train_samples_per_second": 0.022, "train_steps_per_second": 0.037}123version https://git-lfs.github.com/spec/v1oid sha256:abea1e76f744c42bb1a2410accee7956f562e20ed48da307ee0648bcb414d359size 4920README.mdAdded+61
adapter_config.jsonAdded+32
adapter_model.safetensorsAdded+3
added_tokens.jsonAdded+4
all_results.jsonAdded+7
special_tokens_map.jsonAdded+28
tokenizer.jsonAdded
tokenizer.modelAdded+3
tokenizer_config.jsonAdded+98
train_results.jsonAdded+7
training_args.binAdded+3