Downloads · 30 days
21
62% of all-time downloads
KeerthiSaiKasaraneni/danish_model_primary_finetuned_model
danish_model_primary_finetuned_model is a machine learning model from KeerthiSaiKasaraneni. 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 mit.
--- license: apache-2.0 licenselink: https://www.apache.org/licenses/LICENSE-2.0 language: - da basemodel: unsloth/llama-3-8b-bnb-4bit tags: - translation - instruction-following - danish libraryname: transformers ---
Downloads · 30 days
21
62% of all-time downloads
All-time downloads
34
Public
Parameters
8B
16.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.1 GB · 100%
From the Hugging Face model README
license: apache-2.0 license_link: https://www.apache.org/licenses/LICENSE-2.0 language:
Danish Model Primary Finetuned is an experimental research model designed to enhance Danish language understanding and translation capabilities. This model, derived from a LLaMA-based checkpoint with LoRA adaptations, showcases promising improvements in Danish translation tasks, as well as the ability to follow instructions and produce coherent Danish responses. While this is a fine-tuned release, there remain important caveats:
Specification:
For more details on LoRA and other involved techniques, refer to the associated documentation, tutorials, and the base model's README.
This model relies on the latest versions of the Hugging Face transformers library and related dependencies. Using outdated versions may result in compatibility issues or decreased performance.
Recommended Setup:
transformers ≥ 4.37.0torch (with CUDA support for GPU acceleration)bitsandbytes, accelerate, peft, trl, and unsloth for specialized loading and inferenceBelow is a sample snippet illustrating how to load this model and generate responses, following a prompt-based instruction format that the model was trained on.
import torch
from transformers import pipeline
from unsloth import FastLanguageModel
model_name = "KeerthiSaiKasaraneni/danish_model_primary_finetuned_model"
# Load model and tokenizer
model, tokenizer = FastLanguageModel.from_pretrained(
model_name=model_name,
load_in_4bit=True,
dtype=torch.float16
)
FastLanguageModel.for_inference(model)
# Create a text generation pipeline
generation_pipeline = pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
device_map="auto"
)
# Example instruction
instruction = "Translate the following sentence into Danish."
user_input = "What is the capital of Denmark?"
prompt = f"Instruction: {instruction} Input: {user_input} Output:"
generated = generation_pipeline(prompt, max_length=128, num_return_sequences=1)
response = generated[0]['generated_text']
print(response)
If you find our work helpful, feel free to give us a cite.
@misc{danish_model_primary_finetuned,
title = {Danish Model Primary Finetuned},
url = {https://huggingface.co/KeerthiSaiKasaraneni/danish_model_primary_finetuned_model},
author = {[Author/Team Name]},
month = {December},
year = {2024}
}