Views
No views yet
GneissWeb.7B_ablation_model_on_350B_GneissWeb.seed1 model.1pip install torch torchvision torchaudio
2pip install accelerate
3pip install transformers1from transformers import AutoModelForCausalLM, AutoTokenizer
2device = "auto"
3model_path = "ibm-granite/GneissWeb.7B_ablation_model_on_350B_GneissWeb.seed1"
4tokenizer = AutoTokenizer.from_pretrained(model_path)
5# drop device_map if running on CPU
6model = AutoModelForCausalLM.from_pretrained(model_path, device_map=device)
7model.eval()
8# change input text as desired
9input_text = "What is the meaning of 'Gneiss'?"
10# tokenize the text
11input_tokens = tokenizer(input_text, return_tensors="pt").to('cuda')
12# generate output tokens
13output = model.generate(**input_tokens,
14 max_length=43)
15# decode output tokens into text
16output = tokenizer.batch_decode(output)
17# print output
18print(output)
19GneissWeb.7B_ablation_model_on_350B_GneissWeb.seed1 is not the exception in this regard. Even though this model is suited for multiple generative AI tasks, it has not undergone any safety alignment, there it may produce problematic outputs. Additionally, it remains uncertain whether smaller models might exhibit increased susceptibility to hallucination in generation scenarios by copying text verbatim from the training dataset due to their reduced sizes and memorization capacities. This aspect is currently an active area of research, and we anticipate more rigorous exploration, comprehension, and mitigations in this domain. Regarding ethics, a latent risk associated with all Large Language Models is their malicious utilization. We urge the community to use GneissWeb.7B_ablation_model_on_350B_GneissWeb.seed1 model with ethical intentions and in a responsible way.