Instructions to use tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF", filename="heimer-kto-tinyllama-1.1b.Q2_K.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF: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 tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF: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 tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF with Ollama:
ollama run hf.co/tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF:Q4_K_M
- Unsloth Studio
How to use tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF 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 tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF 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 tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF with Docker Model Runner:
docker model run hf.co/tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF:Q4_K_M
- Lemonade
How to use tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tsunemoto/Heimer-kto-TinyLlama-1.1B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Heimer-kto-TinyLlama-1.1B-GGUF-Q4_K_M
List all available models
lemonade list
Tsunemoto GGUF's of Heimer-kto-TinyLlama-1.1B
This is a GGUF quantization of Heimer-kto-TinyLlama-1.1B.
Original Repo Link:
Original Model Card:
Heimer-kto-TinyLlama-1.1B
WandB Experiment Tracking
Check out the experiment details in this report
π§© KTO adaptation hyperparameters
LoRA:
r=8
lora_alpha=16
lora_dropout=0.05
bias="none"
task_type="CAUSAL_LM"
target_modules=['k_proj', 'gate_proj', 'v_proj', 'up_proj', 'q_proj', 'o_proj', 'down_proj']
Training arguments:
per_device_train_batch_size=2
gradient_accumulation_steps=4
gradient_checkpointing=True
learning_rate=5e-5
lr_scheduler_type="cosine"
max_steps=50
optim="paged_adamw_32bit"
warmup_steps=10
DPOTrainer:
beta=0.1
max_prompt_length=1024
max_length=1536
loss="kto_pairs"
π» Usage
Here's a Colab notebook to run Heimer-TinyLLama-1.1B in 4-bit precision on a free T4 GPU.
!pip install -qU transformers accelerate
from transformers import AutoTokenizer
import transformers
import torch
model = "abideen/Heimer-dpo-TinyLlama-1.1B"
messages = [{"role": "user", "content": "Explain what is Data science."}]
tokenizer = AutoTokenizer.from_pretrained(model)
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
pipeline = transformers.pipeline(
"text-generation",
model=model,
torch_dtype=torch.float16,
device_map="auto",
)
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])
"What is Data Science? A data scientist is an individual who has a passion for data and knowledge of the technology that can be used to help make sense of data. Data scientists are often involved in the development of new software and software platforms, as well as analyzing and interpreting data. What are the Important components of Data Science?
- Data: The data is the most important component of a data science project. Data science is the application of data science to make sense of data. Data scientists usually work with data, but data scientists are not necessarily data scientists.
- Analysis: This is the process of taking data and turning it into something useful.
- Modeling: The use of machine learning and statistical techniques.
- Prediction: The prediction of a future event, such as the future market share of a product or the future population of an area.
- Visualization: Displaying the data in a graphical or interactive format.
- Statistics: The use of statistical analysis techniques. What are the Advantages of Data Science? Data science is the application of data science to make sense of data."
- Downloads last month
- 43
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit


