Run this model with HF Jobs
Run avanish07/Hindi-wiki-LLaMA on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/avanish07/Hindi-wiki-LLaMA. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/avanish07/Hindi-wiki-LLaMA on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/avanish07/Hindi-wiki-LLaMA. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/avanish07/Hindi-wiki-LLaMA. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use avanish07/Hindi-wiki-LLaMA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use avanish07/Hindi-wiki-LLaMA with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-7b-hf") model = PeftModel.from_pretrained(base_model, "avanish07/Hindi-wiki-LLaMA") - Notebooks
- Google Colab
- Kaggle
Hindi-wiki-LLaMA
Hindi Wikipedia Article Generation Model This repository contains a language generation model trained on Hindi Wikipedia articles using the Hugging Face Transformers library. The model is based on the Llama-2 architecture and fine-tuned on a large dataset of Hindi text from Wikipedia.
Model Details
- Base Model: Llama-2
- Pretraining Dataset: Hindi Wikipedia Articles
- Tokenizer: Hugging Face Tokenizer
- Model Architecture: Causal Language Modeling
from peft import AutoPeftModelForCausalLM
base_model_name = "meta-llama/Llama-2-7b-hf"
tokenizer = AutoTokenizer.from_pretrained(base_model_name, trust_remote_code=True)
tokenizer.pad_token = tokenizer.eos_token
output_dir = "./final_checkpoint"
device_map = {"": 0}
model = AutoPeftModelForCausalLM.from_pretrained(output_dir, device_map=device_map, torch_dtype=torch.bfloat16)
device = torch.device("cuda")
text = ""
inputs = tokenizer(text, return_tensors="pt").to(device)
outputs = model.generate(input_ids=inputs["input_ids"].to("cuda"), attention_mask=inputs["attention_mask"], max_new_tokens=100, pad_token_id=tokenizer.eos_token_id)
print(tokenizer.decode(outputs[0][len(inputs["input_ids"][0]):], skip_special_tokens=True))
Model Performance:--
The model has been trained on a substantial amount of Hindi Wikipedia articles, which allows it to generate coherent and contextually relevant text.
- Downloads last month
- 4