Instructions to use kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0 with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0", dtype="auto") - llama-cpp-python
How to use kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0", filename="TinyLlama-1.1B-Hinglish-LORA-v1.0-unsloth.Q4_K_M.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0 with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0:Q4_K_M # Run inference directly in the terminal: llama-cli -hf kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0:Q4_K_M # Run inference directly in the terminal: llama-cli -hf kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0:Q4_K_M
Use Docker
docker model run hf.co/kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0 with Ollama:
ollama run hf.co/kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0:Q4_K_M
- Unsloth Studio new
How to use kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0 to start chatting
- Docker Model Runner
How to use kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0 with Docker Model Runner:
docker model run hf.co/kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0:Q4_K_M
- Lemonade
How to use kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0:Q4_K_M
Run and chat with the model
lemonade run user.TinyLlama-1.1B-Hinglish-LORA-v1.0-Q4_K_M
List all available models
lemonade list
TinyLlama-1.1B-Hinglish-LORA-v1.0 model
- Developed by: Kiran Kunapuli
- License: apache-2.0
- Finetuned from model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
- Model config:
model = FastLanguageModel.get_peft_model( model, r = 64, target_modules = ["q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj",], lora_alpha = 128, lora_dropout = 0, bias = "none", use_gradient_checkpointing = True, random_state = 42, use_rslora = True, loftq_config = None, ) - Training parameters:
trainer = SFTTrainer( model = model, tokenizer = tokenizer, train_dataset = dataset, dataset_text_field = "text", max_seq_length = max_seq_length, dataset_num_proc = 2, packing = True, args = TrainingArguments( per_device_train_batch_size = 12, gradient_accumulation_steps = 16, warmup_ratio = 0.1, num_train_epochs = 1, learning_rate = 2e-4, fp16 = not torch.cuda.is_bf16_supported(), bf16 = torch.cuda.is_bf16_supported(), logging_steps = 1, optim = "paged_adamw_32bit", weight_decay = 0.001, lr_scheduler_type = "cosine", seed = 42, output_dir = "outputs", report_to = "wandb", ), ) - Training details:
==((====))== Unsloth - 2x faster free finetuning | Num GPUs = 1 \\ /| Num examples = 15,464 | Num Epochs = 1 O^O/ \_/ \ Batch size per device = 12 | Gradient Accumulation steps = 16 \ / Total batch size = 192 | Total steps = 80 "-____-" Number of trainable parameters = 50,462,720 GPU = NVIDIA GeForce RTX 3090. Max memory = 24.0 GB. Total time taken for 1 epoch - 2h:35m:28s 9443.5288 seconds used for training. 157.39 minutes used for training. Peak reserved memory = 17.641 GB. Peak reserved memory for training = 15.344 GB. Peak reserved memory % of max memory = 73.504 %. Peak reserved memory for training % of max memory = 63.933 %.
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.
[NOTE] TinyLlama's internal maximum sequence length is 2048. We use RoPE Scaling to extend it to 4096 with Unsloth!
- Downloads last month
- 19
4-bit
Model tree for kirankunapuli/TinyLlama-1.1B-Hinglish-LORA-v1.0
Base model
TinyLlama/TinyLlama-1.1B-Chat-v1.0