LLama2 Files Analysis

config.json

  • "_name_or_path": Specifies the name or path of the pretrained model, in this case, "meta-llama/Llama-2-7b-chat-hf".

  • "architectures": Indicates the model architecture, which is ["LlamaForCausalLM"].

  • "bos_token_id" and "eos_token_id": Specify the IDs for the beginning-of-sequence (BOS) and end-of-sequence (EOS) tokens, respectively.

  • "hidden_act": Defines the activation function used in the model, which is "silu" (Sigmoid Linear Unit).

  • "hidden_size": Represents the dimensionality of the hidden states in the model (4096).

  • "initializer_range": Specifies the range for initializing the model's weights (0.02).

  • "intermediate_size": Indicates the dimensionality of the intermediate layer in the model (11008).

  • "max_position_embeddings": Defines the maximum sequence length that the model can handle (4096).

  • "model_type": Specifies the type of the model, which is "llama".

  • "num_attention_heads" and "num_key_value_heads": Represent the number of attention heads and key-value heads in the model (32).

  • "num_hidden_layers": Indicates the number of hidden layers in the model (32).

  • "pretraining_tp": Specifies the tensor parallelism used during pretraining (1).

  • "rms_norm_eps": Defines the epsilon value for RMS normalization (1e-05).

  • "rope_scaling": Indicates the scaling factor for RoPE (Rotary Position Embedding), which is set to null.

  • "tie_word_embeddings": Specifies whether to tie the word embeddings (false).

  • "torch_dtype": Indicates the data type used for the model's weights ("float16").

  • "transformers_version": Specifies the version of the transformers library used (4.32.0.dev0).

  • "use_cache": Indicates whether to use caching during inference (true).

  • "vocab_size": Represents the size of the model's vocabulary (32000).

generation.config.json

  • "bos_token_id" and "eos_token_id": Specify the IDs for the beginning-of-sequence (BOS) and end-of-sequence (EOS) tokens, respectively.

  • "do_sample": Indicates whether to use sampling during generation (true).

  • "max_length": Defines the maximum length of the generated sequence (4096).

  • "pad_token_id": Specifies the ID for the padding token (0).

  • "temperature": Controls the randomness of the generated output (0.6).

  • "top_p": Specifies the cumulative probability threshold for top-p sampling (0.9).

  • "transformers_version": Indicates the version of the transformers library used (4.32.0.dev0).

model.safetensors.index.json: This file contains the weight map, which maps the names of the model's parameters to their corresponding safetensors files. It helps in loading the model weights from the safetensors format.

special_tokens_map.json

  • "bos_token", "eos_token", and "unk_token": Define the special tokens used in the model, such as the beginning-of-sequence (BOS), end-of-sequence (EOS), and unknown (UNK) tokens. Each token is represented as an object with properties like "content", "lstrip", "normalized", "rstrip", and "single_word".

tokenizer_config.json

  • "add_bos_token" and "add_eos_token": Specify whether to add the BOS and EOS tokens during tokenization (true and false, respectively).

  • "bos_token" and "eos_token": Define the BOS and EOS tokens as added tokens with properties similar to the special tokens.

  • "chat_template": Provides a template for generating chat-based responses. It includes instructions for handling system messages, user messages, and assistant messages, as well as special tokens like <<SYS>>, <</SYS>>, [INST], [/INST].

  • "clean_up_tokenization_spaces": Indicates whether to clean up tokenization spaces (false).

  • "legacy": Specifies whether to use legacy tokenization (false).

  • "model_max_length": Defines the maximum length of the model (a very large value).

  • "pad_token": Specifies the padding token (null).

Last updated

Logo

Continuum - Accelerated Artificial Intelligence

Continuum WebsiteAxolotl Platform

Copyright Continuum Labs - 2023