Instructions to use QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF", filename="MalayaLLM_Gemma_7B_Instruct_V1.Q2_K.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-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 QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-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 QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF with Ollama:
ollama run hf.co/QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF:Q4_K_M
- Unsloth Studio new
How to use QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-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 QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-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 QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF to start chatting
- Docker Model Runner
How to use QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.MalayaLLM_Gemma_7B_Instruct_V1-GGUF-Q4_K_M
List all available models
lemonade list
output = llm(
"Once upon a time,",
max_tokens=512,
echo=True
)
print(output)QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF
This is quantized version of VishnuPJ/MalayaLLM_Gemma_7B_Instruct_V1 created using llama.cpp
Original Model Card
MalayaLLM: Gemma [മലയാളം/Malayalam]
Introducing the Developer:
Discover the mind behind this model and stay updated on their contributions to the field https://www.linkedin.com/in/vishnu-prasad-j/
Model description
The MalayaLLM models have been improved and customized expanding upon the groundwork laid by the original Gemma model.
- Model type: A 7B Gemma finetuned model on Malayalam tokens.
- Language(s): Malayalam and English
- Datasets: CohereForAI/aya_dataset
- Source Model: MalayaLLM_Gemma_7B_Base_V1
- GGUF Model: MalayaLLM_Gemma_7B_Instruct_V1_GGUF
- Training Precision:
float16 - Github Repo: MalayaLLM-Gemma
Model Update
Latest Gemma2-9B trained model is here :MalayaLLM:Gemma-2-9B
A simple example code
# Installs Unsloth, Xformers (Flash Attention) and all other packages!
#!pip install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"
#!pip install --no-deps xformers "trl<0.9.0" peft accelerate bitsandbytes
import sentencepiece as spm
from unsloth import FastLanguageModel
import torch
max_seq_length = 2048 # Choose any! We auto support RoPE Scaling internally!
dtype = None # None for auto detection. Float16 for Tesla T4, V100, Bfloat16 for Ampere+
load_in_4bit = True # Use 4bit quantization to reduce memory usage. Can be False.
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="VishnuPJ/MalayaLLM_Gemma_7B_Instruct_V1",
max_seq_length=max_seq_length,
dtype=dtype,
load_in_4bit=load_in_4bit,
)
EOS_TOKEN = tokenizer.eos_token # Must add EOS_TOKEN
FastLanguageModel.for_inference(model) # Enable native 2x faster inference
#### Giving Instruction with Input
'''
alpaca_prompt_1 = """ഒരു ചുമതല വിവരിക്കുന്ന ഒരു നിർദ്ദേശം ചുവടെയുണ്ട്.
അഭ്യർത്ഥന ശരിയായി പൂർത്തിയാക്കുന്ന ഒരു പ്രതികരണം എഴുതുക.".
### നിർദ്ദേശം:
{}
### ഇൻപുട്ട്:
{}
### പ്രതികരണം:
{}"""
inputs = tokenizer([
alpaca_prompt_1.format(
# "Continue the fibonnaci sequence.", # instruction
"""താഴെ ഉള്ള വാക്യത്തിൽ "അത്" എന്ന് പറയുന്നത് എന്തിനെ ആണ് ?""", # instruction
""" ഒരു വാഹനം കയറ്റം കയറുക ആയിരുന്നു .അതിൽ 4 ആൾക്കാർ ഉണ്ടായിരുന്നു. """, # input
"", # output - leave this blank for generation!
)
], return_tensors = "pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=128, use_cache=True)
# Printing the result
print(tokenizer.batch_decode(outputs)[0].split("പ്രതികരണം:\n")[-1])
'''
## Giving Instruction only.
alpaca_prompt_2 = """ഒരു ചുമതല വിവരിക്കുന്ന ഒരു നിർദ്ദേശം ചുവടെയുണ്ട്.
അഭ്യർത്ഥന ശരിയായി പൂർത്തിയാക്കുന്ന ഒരു പ്രതികരണം എഴുതുക.".
### നിർദ്ദേശം:
{}
### പ്രതികരണം:
{}"""
while True:
# Taking user input for the instruction
instruction = input("Enter the instruction (or type 'exit' to quit): ")
if instruction.lower() == 'exit':
break
# Preparing the input for the model
inputs = tokenizer([
alpaca_prompt_2.format(
instruction,
"", # output - leave this blank for generation!
)
], return_tensors="pt").to("cuda")
# Generating the output
outputs = model.generate(**inputs, max_new_tokens=128, use_cache=True)
# Printing the result
print(tokenizer.batch_decode(outputs)[0].split("പ്രതികരണം:\n")[-1])
print("Program terminated.")
''''
Example Output
Enter instruction (or 'exit' to end): ഒരു സമചതുരത്തിന്റെ ഒരു വശം 4 cm ആണെങ്കിൽ , അതിന്റെ area കണ്ടുപിടിക്കുക..
സമചതുരത്തിന്റെ area 16 cm2 ആണ്.<eos>.
Enter instruction (or 'exit' to end): ഇന്ത്യയുടെ അടുത്ത് സ്ഥിതി ചെയുന്ന നാല് രാജ്യങ്ങളുടെ പേര് പറയുക.
"ഇന്ത്യയ്ക്ക് സമീപമുള്ള നാല് രാജ്യങ്ങൾ ഇവയാണ്:
- നേപ്പാൾ
- ഭൂട്ടാൻ
- ടിബറ്റ് (ചൈന)
- പാകിസ്ഥാൻ"<eos>
Enter instruction (or 'exit' to end):exit
Made Using UNSLOTH
Thanks to Unsloth, the process of fine-tuning large language models (LLMs) has become much easier and more efficient.

🌟Happy coding💻🌟
- Downloads last month
- 29
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/MalayaLLM_Gemma_7B_Instruct_V1-GGUF", filename="", )