Downloads · 30 days
28
28% of all-time downloads
braindao/iq-code-evmind-v1-granite-8b-instruct
iq-code-evmind-v1-granite-8b-instruct is a text generation model from braindao. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
28
28% of all-time downloads
All-time downloads
100
Public
Parameters
8.1B
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
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda"
model_path = "braindao/iq-code-evmind-v1-granite-8b-instruct"
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(model_path, device_map=device)
model.eval()
chat = [
{
"role": "user",
"content": "Create a smart contract to serve as a centralized review system called ReviewHub. This contract should allow users to submit and manage reviews for various products or services, rate them on a scale of 1 to 5, and provide detailed comments. It should include functionalities for assigning unique identifiers to products or services, storing and retrieving reviews, allowing users to edit or delete their reviews, calculating average ratings, and enabling an administrator to moderate content. The contract must incorporate robust security measures to ensure review integrity and prevent spam or malicious activity."
},
]
chat = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
input_tokens = tokenizer(chat, return_tensors="pt")
for i in input_tokens:
input_tokens[i] = input_tokens[i].to(device)
output = model.generate(**input_tokens, max_new_tokens=4096)
output = tokenizer.batch_decode(output)
for i in output:
print(i)