|
--- |
|
language: |
|
- en |
|
- de |
|
- fr |
|
- it |
|
- pt |
|
- hi |
|
- es |
|
- th |
|
library_name: transformers |
|
pipeline_tag: text-generation |
|
tags: |
|
- facebook |
|
- meta |
|
- pytorch |
|
- llama |
|
- llama-3 |
|
license: llama3.2 |
|
base_model: |
|
- meta-llama/Llama-3.2-1B-Instruct |
|
datasets: |
|
- motexture/iData |
|
--- |
|
|
|
# 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. |
|
|
|
```python |
|
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: |
|
|
|
1. Enable developers to deploy helpful, safe and flexible experiences for their target audience and for the use cases supported by Llama |
|
2. Protect developers against adversarial users aiming to exploit Llama capabilities to potentially cause harm |
|
3. Provide protections for the community to help prevent the misuse of our models |