Text Generation
Transformers
TensorBoard
Safetensors
llama
trl
sft
Generated from Trainer
conversational
text-generation-inference
Run this model with HF Jobs
Run ManthanKulakarni/TinyLlama-1.1B-Text2SQL 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/ManthanKulakarni/TinyLlama-1.1B-Text2SQL. 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/ManthanKulakarni/TinyLlama-1.1B-Text2SQL 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/ManthanKulakarni/TinyLlama-1.1B-Text2SQL. 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/ManthanKulakarni/TinyLlama-1.1B-Text2SQL. 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 ManthanKulakarni/TinyLlama-1.1B-Text2SQL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ManthanKulakarni/TinyLlama-1.1B-Text2SQL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ManthanKulakarni/TinyLlama-1.1B-Text2SQL") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ManthanKulakarni/TinyLlama-1.1B-Text2SQL") model = AutoModelForCausalLM.from_pretrained("ManthanKulakarni/TinyLlama-1.1B-Text2SQL", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ManthanKulakarni/TinyLlama-1.1B-Text2SQL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ManthanKulakarni/TinyLlama-1.1B-Text2SQL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ManthanKulakarni/TinyLlama-1.1B-Text2SQL", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ManthanKulakarni/TinyLlama-1.1B-Text2SQL
- SGLang
How to use ManthanKulakarni/TinyLlama-1.1B-Text2SQL 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 "ManthanKulakarni/TinyLlama-1.1B-Text2SQL" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ManthanKulakarni/TinyLlama-1.1B-Text2SQL", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "ManthanKulakarni/TinyLlama-1.1B-Text2SQL" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ManthanKulakarni/TinyLlama-1.1B-Text2SQL", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ManthanKulakarni/TinyLlama-1.1B-Text2SQL with Docker Model Runner:
docker model run hf.co/ManthanKulakarni/TinyLlama-1.1B-Text2SQL
Commit ·
b0198f8
1
Parent(s): 7a83895
ManthanKulakarni/Tiny_llama_sql_v1
Browse filesFiles changed (17)
- README.md+8-6
- config.json+15-22
- generation_config.json+2-1
- model.safetensors+2-2
- runs/Jan04_09-14-05_a664a7572be8/events.out.tfevents.1704359672.a664a7572be8.284.0Added+3
- runs/Jan04_09-19-52_a664a7572be8/events.out.tfevents.1704360003.a664a7572be8.284.1Added+3
- runs/Jan04_09-22-10_a664a7572be8/events.out.tfevents.1704360130.a664a7572be8.474.0Added+3
- runs/Jan04_09-23-18_a664a7572be8/events.out.tfevents.1704360198.a664a7572be8.537.0Added+3
- runs/Jan04_09-24-20_a664a7572be8/events.out.tfevents.1704360260.a664a7572be8.589.0Added+3
- runs/Jan04_09-25-19_a664a7572be8/events.out.tfevents.1704360320.a664a7572be8.648.0Added+3
- runs/Jan04_09-29-10_a664a7572be8/events.out.tfevents.1704360551.a664a7572be8.715.0Added+3
- runs/Jan04_09-41-42_a664a7572be8/events.out.tfevents.1704361303.a664a7572be8.782.0Added+3
- special_tokens_map.json+22-4
- tokenizer.json
- tokenizer.modelAdded+3
- tokenizer_config.json+32-10
- training_args.bin+1-1
12345675 unmodified lines1314151617181913 unmodified lines33343536373839404142437 unmodified lines5152535455---license: apache-2.0base_model: tiiuae/falcon-rw-1btags:- generated_from_trainermodel-index:- name: working5 unmodified lines# workingThis model is a fine-tuned version of [tiiuae/falcon-rw-1b](https://huggingface.co/tiiuae/falcon-rw-1b) on the None dataset.## Model description13 unmodified linesThe following hyperparameters were used during training:- learning_rate: 0.0002- train_batch_size: 30- eval_batch_size: 30- seed: 42- gradient_accumulation_steps: 4- total_train_batch_size: 120- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: cosine- lr_scheduler_warmup_ratio: 0.057 unmodified lines- Transformers 4.36.0- Pytorch 2.0.0- Datasets 2.1.0- Tokenizers 0.15.01234567895 unmodified lines1516171819202113 unmodified lines35363738394041424344457 unmodified lines5354555657---license: apache-2.0base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0tags:- trl- sft- generated_from_trainermodel-index:- name: working5 unmodified lines# workingThis model is a fine-tuned version of [TinyLlama/TinyLlama-1.1B-Chat-v1.0](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0) on an unknown dataset.## Model description13 unmodified linesThe following hyperparameters were used during training:- learning_rate: 0.0002- train_batch_size: 16- eval_batch_size: 16- seed: 42- gradient_accumulation_steps: 4- total_train_batch_size: 64- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: cosine- lr_scheduler_warmup_ratio: 0.057 unmodified lines- Transformers 4.36.0- Pytorch 2.0.0- Datasets 2.16.1- Tokenizers 0.15.0
1234567891011121314151617181920212223242526272829303132333435{"_name_or_path": "tiiuae/falcon-rw-1b","alibi": true,"apply_residual_connection_post_layernorm": false,"architectures": ["FalconForCausalLM"],"attention_dropout": 0.0,"auto_map": {"AutoConfig": "tiiuae/falcon-rw-1b--configuration_falcon.FalconConfig","AutoModel": "tiiuae/falcon-rw-1b--modeling_falcon.FalconModel","AutoModelForCausalLM": "tiiuae/falcon-rw-1b--modeling_falcon.FalconForCausalLM","AutoModelForQuestionAnswering": "tiiuae/falcon-rw-1b--modeling_falcon.FalconForQuestionAnswering","AutoModelForSequenceClassification": "tiiuae/falcon-rw-1b--modeling_falcon.FalconForSequenceClassification","AutoModelForTokenClassification": "tiiuae/falcon-rw-1b--modeling_falcon.FalconForTokenClassification"},"bias": true,"bos_token_id": 1,"eos_token_id": 2,"hidden_dropout": 0.0,"hidden_size": 2048,"initializer_range": 0.02,"layer_norm_epsilon": 1e-05,"model_type": "falcon","multi_query": false,"new_decoder_architecture": false,"num_attention_heads": 32,"num_hidden_layers": 24,"num_kv_heads": 32,"parallel_attn": false,"torch_dtype": "bfloat16","transformers_version": "4.36.0","use_cache": false,"vocab_size": 50304}12345678910111213141516171819202122232425262728{"_name_or_path": "TinyLlama/TinyLlama-1.1B-Chat-v1.0","architectures": ["LlamaForCausalLM"],"attention_bias": false,"attention_dropout": 0.0,"bos_token_id": 1,"eos_token_id": 2,"hidden_act": "silu","hidden_size": 2048,"initializer_range": 0.02,"intermediate_size": 5632,"max_position_embeddings": 2048,"model_type": "llama","num_attention_heads": 32,"num_hidden_layers": 22,"num_key_value_heads": 4,"pretraining_tp": 1,"rms_norm_eps": 1e-05,"rope_scaling": null,"rope_theta": 10000.0,"tie_word_embeddings": false,"torch_dtype": "bfloat16","transformers_version": "4.36.0","use_cache": false,"vocab_size": 32000}
123456{"_from_model_config": true,"bos_token_id": 1,"eos_token_id": 2,"transformers_version": "4.36.0"}1234567{"bos_token_id": 1,"eos_token_id": 2,"max_length": 2048,"pad_token_id": 0,"transformers_version": "4.36.0"}
123version https://git-lfs.github.com/spec/v1oid sha256:7699a3ed8683fef29c48b38d918faf22191d08a26cea3b9f890322eabbb56ef4size 2623284688123version https://git-lfs.github.com/spec/v1oid sha256:a037d81d18d893faf2ea1b990431621cf40879d72f522d3a153ebec4c7c933f7size 2200119864
123version https://git-lfs.github.com/spec/v1oid sha256:0ee1dce7c82cf65a0a59afde505a6616ecbeeee8509d3f662d16c0f4993ca9d1size 4403123version https://git-lfs.github.com/spec/v1oid sha256:937df079b14065dfc1a09b64d13afe7c6fdb01b4ef9900c69c65fc932e753c83size 4184123version https://git-lfs.github.com/spec/v1oid sha256:8e0a41f1650d18739042783b5ad9cde59c6b31c7eaae390ad9f293898d5674e8size 4402123version https://git-lfs.github.com/spec/v1oid sha256:768099f980eef86d0433af4877d21d02935ed2794d9615c19a002adf19b637d1size 4402123version https://git-lfs.github.com/spec/v1oid sha256:fb6ef6da67a0fabe965cc91dd936be6010747b9daeefd5e97ff59ad0262829f7size 4402123version https://git-lfs.github.com/spec/v1oid sha256:095592a9961e4ca58d836604baeeefbbe511abc19462c750b1c57f178d825ef2size 4402123version https://git-lfs.github.com/spec/v1oid sha256:6899e6f51b5d78e89c00cc87c12cea4fe08a861d64e36da9e3dbbcb2efc549d4size 4402123version https://git-lfs.github.com/spec/v1oid sha256:0d4d4be74de9bdf749c24aff6a49de5312b8daaf208f5d0c3ff96c52433f9892size 11963123456{"bos_token": "<|endoftext|>","eos_token": "<|endoftext|>","pad_token": "<|endoftext|>","unk_token": "<|endoftext|>"}123456789101112131415161718192021222324{"bos_token": {"content": "<s>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false},"eos_token": {"content": "</s>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false},"pad_token": "</s>","unk_token": {"content": "<unk>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false}}
123version https://git-lfs.github.com/spec/v1oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347size 499723123456781 unmodified line101112131415161718192021{"add_prefix_space": false,"added_tokens_decoder": {"50256": {"content": "<|endoftext|>","lstrip": false,"normalized": false,"rstrip": false,1 unmodified line"special": true}},"bos_token": "<|endoftext|>","clean_up_tokenization_spaces": true,"eos_token": "<|endoftext|>","model_max_length": 1024,"pad_token": "<|endoftext|>","tokenizer_class": "GPT2Tokenizer","torch_dtype": "auto","unk_token": "<|endoftext|>"}123456789101112131415161718192021222324251 unmodified line2728293031323334353637383940414243{"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,1 unmodified line"special": true}},"bos_token": "<s>","chat_template": "{% for message in messages %}\n{% if message['role'] == 'user' %}\n{{ '<|user|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'system' %}\n{{ '<|system|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'assistant' %}\n{{ '<|assistant|>\n' + message['content'] + eos_token }}\n{% endif %}\n{% if loop.last and add_generation_prompt %}\n{{ '<|assistant|>' }}\n{% endif %}\n{% endfor %}","clean_up_tokenization_spaces": false,"eos_token": "</s>","legacy": false,"model_max_length": 2048,"pad_token": "</s>","padding_side": "right","sp_model_kwargs": {},"tokenizer_class": "LlamaTokenizer","torch_dtype": "auto","unk_token": "<unk>","use_default_system_prompt": false}
123version https://git-lfs.github.com/spec/v1oid sha256:5c6107fe494cce67604f477c6e3ddb0c7eef565a136c71951dc32799619dd52asize 4283123version https://git-lfs.github.com/spec/v1oid sha256:c059259d701efc7a4cf05c2b359676323f5dfa13c6e55b071978ad930a342957size 4283
README.md+8-6
config.json+15-22
generation_config.json+2-1
model.safetensors+2-2
runs/Jan04_09-14-05_a664a7572be8/events.out.tfevents.1704359672.a664a7572be8.284.0Added+3
runs/Jan04_09-19-52_a664a7572be8/events.out.tfevents.1704360003.a664a7572be8.284.1Added+3
runs/Jan04_09-22-10_a664a7572be8/events.out.tfevents.1704360130.a664a7572be8.474.0Added+3
runs/Jan04_09-23-18_a664a7572be8/events.out.tfevents.1704360198.a664a7572be8.537.0Added+3
runs/Jan04_09-24-20_a664a7572be8/events.out.tfevents.1704360260.a664a7572be8.589.0Added+3
runs/Jan04_09-25-19_a664a7572be8/events.out.tfevents.1704360320.a664a7572be8.648.0Added+3
runs/Jan04_09-29-10_a664a7572be8/events.out.tfevents.1704360551.a664a7572be8.715.0Added+3
runs/Jan04_09-41-42_a664a7572be8/events.out.tfevents.1704361303.a664a7572be8.782.0Added+3
special_tokens_map.json+22-4
tokenizer.json
tokenizer.modelAdded+3
tokenizer_config.json+32-10
training_args.bin+1-1