Downloads · 30 days
7
5% of all-time downloads
DarkWhiteProductions/Tiny-Urvashi-v1.1
Tiny-Urvashi-v1.1 is a text generation model from DarkWhiteProductions. Use it when you need the model to write or continue text. It is set up for transformers.
This model is a distilled version of ([tannedbum/L3-Rhaenys-8B]) using ([Divyansh008/Urvashi-1B-rp]) as the student model. The goal of this distillation was to test and create a smaller, faster model with similar perf…
Downloads · 30 days
7
5% of all-time downloads
All-time downloads
128
Public
Parameters
1.2B
5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors4.9 GB · 100%
From the Hugging Face model README
This model is a distilled version of ([tannedbum/L3-Rhaenys-8B]) using ([Divyansh008/Urvashi-1B-rp]) as the student model. The goal of this distillation was to test and create a smaller, faster model with similar performance.
This model is intended for text generation, summarization, question answering.
The model was trained using a distillation process.
The model was trained using knowledge distillation with a Mean Squared Error (MSE) loss between the teacher and student model logits.
[If you have any evaluation results, describe them here. For example, you could compare the generated text quality or performance metrics between the teacher and student models.]
You can use this model with the Hugging Face transformers library.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# Replace with your model's repository ID on Hugging Face Hub
model_name = "Divyansh008/Tiny-Urvashi-v1-PPO"
# Load model and tokenizer
try:
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
print(f"✅ Successfully loaded {model_name}")
except Exception as e:
print(f"❌ Failed to load {model_name}: {e}")
exit()
# Set device
device = "cuda" if torch.cuda.is_available() else "cpu"
model.to(device)
print(f"Using device: {device}")
# Set the model to evaluation mode
model.eval()
# Example prompt for generation
prompt = "Explain the concept of machine learning in simple terms:"
# Tokenize the prompt
inputs = tokenizer(prompt, return_tensors="pt", padding=True, truncation=True).to(device)
input_ids = inputs["input_ids"]
attention_mask = inputs["attention_mask"]
# Set pad token id for generation if it's not already set
if model.config.pad_token_id is None:
model.config.pad_token_id = tokenizer.pad_token_id
# Generate text
with torch.no_grad():
output = model.generate(
input_ids,
attention_mask=attention_mask,
max_length=100,
num_return_sequences=1,
no_repeat_ngram_size=2,
pad_token_id=tokenizer.pad_token_id
)
# Decode the generated text
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
print("\nGenerated Text:")
print(generated_text)