-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathministral.Rd
More file actions
81 lines (60 loc) · 1.86 KB
/
Copy pathministral.Rd
File metadata and controls
81 lines (60 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ministral.R
\name{ministral}
\alias{ministral}
\alias{ministral_from_config}
\alias{ministral_from_pretrained}
\title{ministral}
\usage{
ministral(
vocab_size = 131072,
n_embd = 5120,
n_inter = 16384,
n_head = 32,
n_kv_head = 8,
head_dim = 128,
n_layer = 40,
max_pos = 262144,
rmsnorm_eps = 1e-05,
rope_base = 1e+09,
rope_factor = 16,
rope_beta_fast = 32,
rope_beta_slow = 1,
rope_original_max_pos = 16384,
rope_mscale = 1,
rope_mscale_all_dim = 1
)
ministral_from_config(identifier, revision = "main")
ministral_from_pretrained(identifier, revision = "main")
}
\arguments{
\item{vocab_size}{Vocabulary size.}
\item{n_embd}{Embedding dimension.}
\item{n_inter}{Intermediate size in MLP.}
\item{n_head}{Number of attention heads.}
\item{n_kv_head}{Number of key/value heads (for GQA).}
\item{head_dim}{Dimension of each attention head.}
\item{n_layer}{Number of transformer layers.}
\item{max_pos}{Maximum position embeddings.}
\item{rmsnorm_eps}{Epsilon for RMSNorm.}
\item{rope_base}{Base for rotary embeddings.}
\item{rope_factor}{YaRN scaling factor.}
\item{rope_beta_fast}{YaRN beta_fast parameter.}
\item{rope_beta_slow}{YaRN beta_slow parameter.}
\item{rope_original_max_pos}{Original max position embeddings for YaRN.}
\item{rope_mscale}{YaRN mscale parameter.}
\item{rope_mscale_all_dim}{YaRN mscale_all_dim parameter.}
\item{identifier}{HuggingFace model identifier.}
\item{revision}{HuggingFace model revision.}
}
\value{
An initialized \code{\link[torch:nn_module]{torch::nn_module()}}.
}
\description{
Initializes a Ministral-like model with YaRN RoPE and GQA
}
\section{Functions}{
\itemize{
\item \code{ministral_from_config()}: Initializes from HuggingFace config
\item \code{ministral_from_pretrained()}: Initializes and loads pretrained weights from HF Hub
}}