Downloads · 30 days
2
17% of all-time downloads
huge-michael/sylvan-model
sylvan-model is a machine learning model from huge-michael. 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.
- Finetuned from model [optional]: Qwen/Qwen2.5-Coder-7B-Instruct [More Information Needed]
Downloads · 30 days
2
17% of all-time downloads
All-time downloads
12
Public
Parameters
7.6B
30.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors30.5 GB · 100%
From the Hugging Face model README
Use the code below to get started with the model.
from transformers import AutoTokenizer, AutoModelForCausalLM from transformers import AutoModelForCausalLM, AutoTokenizer import torch
model_name = "huge-michael/sylvan-model"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True, device_map="auto")
model.eval()
prompt = """ write a function def process_and_analyze_csv_data(df) to: Processes and analyzes a CSV dataset for train-test split, feature scaling, and data statistics.
The function should output with: dict: A dictionary containing train/test split data, scaled features, and statistical data.
You should start with: ['pandas as pd', 'numpy as np', 'train_test_split', 'StandardScaler'] def process_and_analyze_csv_data(df)"""
messages = [ {"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."}, {"role": "user", "content": prompt} ]
text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True # adds the Assistant role placeholder for generation )
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
with torch.no_grad(): outputs = model.generate( **model_inputs, max_new_tokens=800, temperature=0.7, # adjust for randomness top_p=0.9 # adjust for response diversity )
generated_ids = [ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, outputs) ]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print("Assistant response:\n", response)
[More Information Needed]