Downloads · 30 days
0
theoracle/autotrain-kaggle
autotrain-kaggle is a text generation model from theoracle. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as other.
Developed with the cutting-edge AutoTrain and PEFT technologies, this model is specifically trained to provide detailed answers to questions about Kaggle. Whether you're wondering how to get started, how to submit to…
Downloads · 30 days
0
Access
Public
Updated Mar 29, 2024
Repo size
100 MB
Likes
0
Public
Click a slice to open those files.
.safetensors78.5 MB · 78%
From the Hugging Face model README
Developed with the cutting-edge AutoTrain and PEFT technologies, this model is specifically trained to provide detailed answers to questions about Kaggle. Whether you're wondering how to get started, how to submit to a competition, or how to navigate the datasets, this model is equipped to assist.
The following Python code snippet illustrates how to use this model to answer your Kaggle-related questions:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_path = "theoracle/autotrain-kaggle"
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(
model_path,
device_map="auto",
torch_dtype='auto'
).eval()
tokenizer.pad_token = tokenizer.eos_token
prompt = '''
### How do I prepare for Kaggle competitions?\n ### Answer:
'''
encoding = tokenizer(prompt, return_tensors='pt', padding=True, truncation=True, max_length=500, add_special_tokens=True)
input_ids = encoding['input_ids']
attention_mask = encoding['attention_mask']
output_ids = model.generate(
input_ids.to('cuda'),
attention_mask=attention_mask.to('cuda'),
max_new_tokens=300,
pad_token_id=tokenizer.eos_token_id
)
response = tokenizer.decode(output_ids[0], skip_special_tokens=True)
print(response)
This model is particularly useful for:
AutoTrain by Hugging Face streamlines the model training process, making it easier and more efficient to develop state-of-the-art models. PEFT enhances this by providing a framework for efficient model training and deployment. Together, they enable this model to deliver fast and accurate responses to your Kaggle inquiries.
This model is distributed under an "other" license, allowing diverse applications while encouraging users to review the license terms for compliance with their project requirements.