Transformers
PyTorch
Safetensors
GGUF
English
llama
text-generation-inference
unsloth
trl
sft
conversational
Instructions to use Ramikan-BR/tinyllama-coder-py-4bit-v5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ramikan-BR/tinyllama-coder-py-4bit-v5 with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Ramikan-BR/tinyllama-coder-py-4bit-v5", dtype="auto") - llama-cpp-python
How to use Ramikan-BR/tinyllama-coder-py-4bit-v5 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Ramikan-BR/tinyllama-coder-py-4bit-v5", filename="tinyllama-coder-py-4bit-v5-unsloth.Q8_0.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 Ramikan-BR/tinyllama-coder-py-4bit-v5 with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Ramikan-BR/tinyllama-coder-py-4bit-v5:Q8_0 # Run inference directly in the terminal: llama-cli -hf Ramikan-BR/tinyllama-coder-py-4bit-v5:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Ramikan-BR/tinyllama-coder-py-4bit-v5:Q8_0 # Run inference directly in the terminal: llama-cli -hf Ramikan-BR/tinyllama-coder-py-4bit-v5:Q8_0
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 Ramikan-BR/tinyllama-coder-py-4bit-v5:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf Ramikan-BR/tinyllama-coder-py-4bit-v5:Q8_0
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 Ramikan-BR/tinyllama-coder-py-4bit-v5:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Ramikan-BR/tinyllama-coder-py-4bit-v5:Q8_0
Use Docker
docker model run hf.co/Ramikan-BR/tinyllama-coder-py-4bit-v5:Q8_0
- LM Studio
- Jan
- Ollama
How to use Ramikan-BR/tinyllama-coder-py-4bit-v5 with Ollama:
ollama run hf.co/Ramikan-BR/tinyllama-coder-py-4bit-v5:Q8_0
- Unsloth Studio new
How to use Ramikan-BR/tinyllama-coder-py-4bit-v5 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 Ramikan-BR/tinyllama-coder-py-4bit-v5 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 Ramikan-BR/tinyllama-coder-py-4bit-v5 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Ramikan-BR/tinyllama-coder-py-4bit-v5 to start chatting
- Docker Model Runner
How to use Ramikan-BR/tinyllama-coder-py-4bit-v5 with Docker Model Runner:
docker model run hf.co/Ramikan-BR/tinyllama-coder-py-4bit-v5:Q8_0
- Lemonade
How to use Ramikan-BR/tinyllama-coder-py-4bit-v5 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Ramikan-BR/tinyllama-coder-py-4bit-v5:Q8_0
Run and chat with the model
lemonade run user.tinyllama-coder-py-4bit-v5-Q8_0
List all available models
lemonade list
Uploaded model
- Developed by: Ramikan-BR
- License: apache-2.0
- Finetuned from model : unsloth/tinyllama-chat-bnb-4bit
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.
Inference tests after refinement
Test 1: Continuing the Fibonacci sequence
alpaca_prompt = "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n### Input:\nContinue the fibonnaci sequence.\n\n### Output:"
from unsloth import FastLanguageModel
FastLanguageModel.for_inference(model) # Enable native 2x faster inference
inputs = tokenizer([alpaca_prompt.format("Continue the fibonnaci sequence.", "1, 1, 2, 3, 5, 8", "")], return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=64, use_cache=True)
print(tokenizer.batch_decode(outputs))
Output:
['<s> Below is an instruction that describes a task. Write a response that appropriately completes the request.\n### Input:\nContinue the fibonnaci sequence.\n\n### Output:\n1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89</s>']
**Test 2: Famous tall tower in Paris**
alpaca_prompt = "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n### Input:\nWhat is a famous tall tower in Paris?\n\n### Output:"
from unsloth import FastLanguageModel
FastLanguageModel.for_inference(model) # Enable native 2x faster inference
inputs = tokenizer([alpaca_prompt.format("What is a famous tall tower in Paris?", "", "")], return_tensors="pt").to("cuda")
from transformers import TextStreamer
text_streamer = TextStreamer(tokenizer)
_ = model.generate(**inputs, streamer=text_streamer, max_new_tokens=64)
Output:
Eiffel Tower, located in Paris, is a famous tall tower that stands at 320 meters (98 feet) tall. It was built in 189002 as a symbol of the city's modernization and progress, and it remains an iconic landmark to this
For the first time, the AI answered both questions correctly, despite the response about the Eiffel Tower containing errors about the year and not finishing the response. I will continue refining the AI with the data-oss_instruct-decontaminated_python.jsonl dataset. This version of the dataset only contains Python code, and since I can only train on the free Colab GPU, I was forced to split the dataset into 10 parts and refine the AI for two epochs with each part (up to this point, we are on the fifth part of the dataset)... Thanks to the Unsloth team, without you, I wouldn't have even achieved any relevant training on an AI since I don't have a GPU!
- Downloads last month
- 49
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for Ramikan-BR/tinyllama-coder-py-4bit-v5
Base model
unsloth/tinyllama-chat-bnb-4bit
docker model run hf.co/Ramikan-BR/tinyllama-coder-py-4bit-v5:Q8_0