Text Generation
Transformers
Safetensors
PyTorch
llama
facebook
meta
llama-3
conversational
text-generation-inference
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("motexture/iTech-1B-Instruct")
model = AutoModelForCausalLM.from_pretrained("motexture/iTech-1B-Instruct")
messages = [
{"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))Quick Links
iTech-1B-Instruct
Introduction
iTech-1B-Instruct is an IT assistant, a fine-tuned version of Llama-3.2.1B-Instruct trained on the iData dataset.
Quickstart
Here provides a code snippet with apply_chat_template to show you how to load the tokenizer and model and how to generate contents.
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda" # the device to load the model onto
model = AutoModelForCausalLM.from_pretrained(
"motexture/iTech-1B-Instruct",
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("motexture/iTech-1B-Instruct")
prompt = "What are some common design challenges and solutions in configuring and managing storage devices in computing systems, particularly in the context of legacy systems?"
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(device)
generated_ids = model.generate(
model_inputs.input_ids,
max_new_tokens=4096
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
Responsibility & Safety
As part of our Responsible release approach, we followed a three-pronged strategy to managing trust & safety risks:
- Enable developers to deploy helpful, safe and flexible experiences for their target audience and for the use cases supported by Llama
- Protect developers against adversarial users aiming to exploit Llama capabilities to potentially cause harm
- Provide protections for the community to help prevent the misuse of our models
- Downloads last month
- 8
Model tree for motexture/iTech-1B-Instruct
Base model
meta-llama/Llama-3.2-1B-Instruct
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="motexture/iTech-1B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)