Llama-3.1-Minitron-4B-Depth-Base is a base text-to-text model that can be adopted for a variety of natural language generation tasks.
It is obtained by pruning Llama-3.1-8B; specifically, we prune the number of transformer blocks in the model. Following pruning, we perform continued training with distillation using 94 billion tokens to arrive at the final model; we use the continuous pre-training data corpus used in Nemotron-4 15B for this purpose.
This model is ready for commercial use.
Model Developer:
NVIDIA
Model Dates:
Llama-3.1-Minitron-4B-Depth-Base was trained between July 29, 2024 and Aug 3, 2024
Llama-3.1-Minitron-4B-Depth-Base uses a model embedding size of 4096, 32 attention heads, MLP intermediate dimension of 14336, with 32 layers in total. Additionally, it uses Grouped-Query Attention (GQA) and Rotary Position Embeddings (RoPE).
Architecture Type:
Transformer Decoder (Auto-Regressive Language Model)
Network Architecture:
Llama-3.1
Input Type(s):
Text
Input Format(s):
String
Input Parameters:
None
Other Properties Related to Input:
Works well within 8k characters or less.
Output Type(s):
Text
Output Format:
String
Output Parameters:
1D
Other Properties Related to Output:
None
Usage
import torch
from transformers import AutoTokenizer, LlamaForCausalLM
# Load the tokenizer and model
model_path = "nvidia/Llama-3.1-Minitron-4B-Depth-Base"
tokenizer = AutoTokenizer.from_pretrained(model_path)
device = 'cuda'
dtype = torch.bfloat16
model = LlamaForCausalLM.from_pretrained(model_path, torch_dtype=dtype, device_map=device)
# Prepare the input text
prompt = 'Complete the paragraph: our solar system is'
inputs = tokenizer.encode(prompt, return_tensors='pt').to(model.device)
# Generate the output
outputs = model.generate(inputs, max_length=20)
# Decode and print the output
output_text = tokenizer.decode(outputs[0])
print(output_text)
Properties:
The training corpus for Llama-3.1-Minitron-4B-Depth-Base consists of English and multilingual text, as well as code. Our sources cover a variety of document types such as: webpages, dialogue, articles, and other written materials. The corpus spans domains including legal, math, science, finance, and more. In our continued training set, we introduce a small portion of question-answering, and alignment style data to improve model performance.
Data Freshness:
The pretraining data has a cutoff of June 2023.
Zero-shot performance.
Evaluated using select datasets from the
LM Evaluation Harness
with additions:
HellaSwag
Winogrande
GSM8K
ARC-Challenge
XLSum
73.2
72.1
16.8
52.6
27.2
Code generation performance.
Evaluated using
MBPP
:
Score
30.7
Inference
Engine:
TensorRT-LLM
Test Hardware:
NVIDIA A100
DType:
BFloat16
Limitations
The model was trained on data that contains toxic language, unsafe content, and societal biases originally crawled from the internet. Therefore, the model may amplify those biases and return toxic responses especially when prompted with toxic prompts. The model may generate answers that may be inaccurate, omit key information, or include irrelevant or redundant text producing socially unacceptable or undesirable text, even if the prompt itself does not include anything explicitly offensive.
Ethical Considerations
NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse.
Please report security vulnerabilities or NVIDIA AI Concerns
here
.
Llama-3.1-Minitron-4B-Depth-Base-GGUF huggingface.co is an AI model on huggingface.co that provides Llama-3.1-Minitron-4B-Depth-Base-GGUF's model effect (), which can be used instantly with this QuantFactory Llama-3.1-Minitron-4B-Depth-Base-GGUF model. huggingface.co supports a free trial of the Llama-3.1-Minitron-4B-Depth-Base-GGUF model, and also provides paid use of the Llama-3.1-Minitron-4B-Depth-Base-GGUF. Support call Llama-3.1-Minitron-4B-Depth-Base-GGUF model through api, including Node.js, Python, http.
Llama-3.1-Minitron-4B-Depth-Base-GGUF huggingface.co is an online trial and call api platform, which integrates Llama-3.1-Minitron-4B-Depth-Base-GGUF's modeling effects, including api services, and provides a free online trial of Llama-3.1-Minitron-4B-Depth-Base-GGUF, you can try Llama-3.1-Minitron-4B-Depth-Base-GGUF online for free by clicking the link below.
QuantFactory Llama-3.1-Minitron-4B-Depth-Base-GGUF online free url in huggingface.co:
Llama-3.1-Minitron-4B-Depth-Base-GGUF is an open source model from GitHub that offers a free installation service, and any user can find Llama-3.1-Minitron-4B-Depth-Base-GGUF on GitHub to install. At the same time, huggingface.co provides the effect of Llama-3.1-Minitron-4B-Depth-Base-GGUF install, users can directly use Llama-3.1-Minitron-4B-Depth-Base-GGUF installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
Llama-3.1-Minitron-4B-Depth-Base-GGUF install url in huggingface.co: