Downloads · 30 days
14
9% of all-time downloads
Naman0807/gujarati-llama2-base
gujarati-llama2-base is a machine learning model from Naman0807. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
A compact, fine-tuned Llama2 model specialized for the Gujarati language.
Downloads · 30 days
14
9% of all-time downloads
All-time downloads
158
Public
Repo size
776 MB
Likes
0
Public
Click a slice to open those files.
.bin388 MB · 99%
From the Hugging Face model README
A compact, fine-tuned Llama2 model specialized for the Gujarati language.
This is a Llama2-based language model trained on Gujarati text data. It's designed to generate coherent and contextually relevant Gujarati language text. The model is a smaller variant optimized for efficiency while maintaining reasonable language understanding capabilities.
This model is optimized for Gujarati text generation tasks. It has been trained on a curated Gujarati text corpus and is capable of:
Primary Use Cases:
Out-of-scope Uses:
from transformers import LlamaForCausalLM, PreTrainedTokenizerFast
# Load model and tokenizer
model = LlamaForCausalLM.from_pretrained("Naman0807/gujarati-llama2-base")
tokenizer = PreTrainedTokenizerFast.from_pretrained("Naman0807/gujarati-llama2-base")
# Generate text
prompt = "ગુજરાત એક અદભુત"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(inputs["input_ids"], max_length=100, temperature=0.7)
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(generated_text)
from transformers import pipeline
generator = pipeline("text-generation", model="Naman0807/gujarati-llama2-base")
output = generator("ગુજરાત", max_length=100)
print(output)
A custom Unigram tokenizer has been trained on the Gujarati corpus with:
<pad>, <unk>, <bos>, <eos>This is a relatively small model (512 hidden size, 6 layers), resulting in:
Feedback, bug reports, and contributions are welcome. Please open an issue or pull request if you have suggestions for improvement.
If you use this model, please cite:
@model{gujarati-llama2-base,
title={Gujarati Llama2 Base},
author={Naman},
year={2025},
publisher={Hugging Face},
howpublished={\url{https://huggingface.co/Naman0807/gujarati-llama2-base}}
}
This model is provided "as is" without warranties. Users are responsible for ensuring compliance with applicable laws and ethical guidelines when using this model.
Model Version: 1.0
Last Updated: January 2, 2026