arcee-ai / gemma-10b-it-expanded

huggingface.co
Total runs: 102
24-hour runs: 0
7-day runs: 22
30-day runs: 80
Model's Last Updated: March 12 2024
text-generation

Introduction of gemma-10b-it-expanded

Model Details of gemma-10b-it-expanded

Gemma-IT-Expanded-Unfrozen-Layers

This method employs mergekit's passthrough method to expand blocks within the "google/gemma-7b-it" model. For every fourth layer, a new layer is added, with the o_proj and down_proj parameters of these added layers initialized to zero, mirroring the approach used in LLaMA Pro. It's important to note that this configuration has not undergone fine-tuning. Therefore, when fine-tuning, ensure that only every fourth layer is adjusted, while all other layers remain frozen.

🧩 Configuration
slices:
  - sources:
      - model: google/gemma-7b-it
        layer_range: [0, 4]
  - sources:
      - model: google/gemma-7b-it
        layer_range: [3, 4]
        parameters:
          scale:
            - filter: o_proj
              value: 0.0
            - filter: down_proj
              value: 0.0
            - value: 1.0

  - sources:
      - model: google/gemma-7b-it
        layer_range: [4, 8]
  - sources:
      - model: google/gemma-7b-it
        layer_range: [7, 8]
        parameters:
          scale:
            - filter: o_proj
              value: 0.0
            - filter: down_proj
              value: 0.0
            - value: 1.0

  - sources:
      - model: google/gemma-7b-it
        layer_range: [8, 12]
  - sources:
      - model: google/gemma-7b-it
        layer_range: [11, 12]
        parameters:
          scale:
            - filter: o_proj
              value: 0.0
            - filter: down_proj
              value: 0.0
            - value: 1.0

  - sources:
      - model: google/gemma-7b-it
        layer_range: [12, 16]
  - sources:
      - model: google/gemma-7b-it
        layer_range: [15, 16]
        parameters:
          scale:
            - filter: o_proj
              value: 0.0
            - filter: down_proj
              value: 0.0
            - value: 1.0

  - sources:
      - model: google/gemma-7b-it
        layer_range: [16, 20]
  - sources:
      - model: google/gemma-7b-it
        layer_range: [19, 20]
        parameters:
          scale:
            - filter: o_proj
              value: 0.0
            - filter: down_proj
              value: 0.0
            - value: 1.0

  - sources:
      - model: google/gemma-7b-it
        layer_range: [20, 24]
  - sources:
      - model: google/gemma-7b-it
        layer_range: [23, 24]
        parameters:
          scale:
            - filter: o_proj
              value: 0.0
            - filter: down_proj
              value: 0.0
            - value: 1.0

  - sources:
      - model: google/gemma-7b-it
        layer_range: [24, 28]
  - sources:
      - model: google/gemma-7b-it
        layer_range: [27, 28]
        parameters:
          scale:
            - filter: o_proj
              value: 0.0
            - filter: down_proj
              value: 0.0
            - value: 1.0

merge_method: passthrough
dtype: bfloat16


# Function to freeze layers

from transformers import AutoModelForCausalLM

def update_layer_gradients(model, n):
    """
    Enables gradients only for every nth layer within the model's layers, starting from the layer after the 0th.
    
    :param model: The model instance, assumed to be of type GemmaForCausalLM or similar.
    :param n: Interval at which layers after the first will have their gradients enabled, indicating they are newly added.
    """
    layers = model.model.layers  # Access the ModuleList containing the layers
  
    for i, layer in enumerate(layers):
        if i % n == (n - 1):  # Enables gradients for every nth layer, starting from the layer after the 0th
            print(i)
            for param in layer.parameters():
                param.requires_grad = True
        else:
            for param in layer.parameters():
                param.requires_grad = False

# Load the model
model = AutoModelForCausalLM.from_pretrained("/Users/gayalshamane/Documents/mergekit/gemma-2b-it-expanded")


# Update layer gradients, specify the correct value for n based on your model's architecture
n = 5  # Example: update every 4rd layer, starting from the first layer after the 0th, adjust this value as needed
update_layer_gradients(model, n)

Runs of arcee-ai gemma-10b-it-expanded on huggingface.co

102
Total runs
0
24-hour runs
8
3-day runs
22
7-day runs
80
30-day runs

More Information About gemma-10b-it-expanded huggingface.co Model

More gemma-10b-it-expanded license Visit here:

https://choosealicense.com/licenses/apache-2.0

gemma-10b-it-expanded huggingface.co

gemma-10b-it-expanded huggingface.co is an AI model on huggingface.co that provides gemma-10b-it-expanded's model effect (), which can be used instantly with this arcee-ai gemma-10b-it-expanded model. huggingface.co supports a free trial of the gemma-10b-it-expanded model, and also provides paid use of the gemma-10b-it-expanded. Support call gemma-10b-it-expanded model through api, including Node.js, Python, http.

gemma-10b-it-expanded huggingface.co Url

https://huggingface.co/arcee-ai/gemma-10b-it-expanded

arcee-ai gemma-10b-it-expanded online free

gemma-10b-it-expanded huggingface.co is an online trial and call api platform, which integrates gemma-10b-it-expanded's modeling effects, including api services, and provides a free online trial of gemma-10b-it-expanded, you can try gemma-10b-it-expanded online for free by clicking the link below.

arcee-ai gemma-10b-it-expanded online free url in huggingface.co:

https://huggingface.co/arcee-ai/gemma-10b-it-expanded

gemma-10b-it-expanded install

gemma-10b-it-expanded is an open source model from GitHub that offers a free installation service, and any user can find gemma-10b-it-expanded on GitHub to install. At the same time, huggingface.co provides the effect of gemma-10b-it-expanded install, users can directly use gemma-10b-it-expanded installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

gemma-10b-it-expanded install url in huggingface.co:

https://huggingface.co/arcee-ai/gemma-10b-it-expanded

Url of gemma-10b-it-expanded

gemma-10b-it-expanded huggingface.co Url

Provider of gemma-10b-it-expanded huggingface.co

arcee-ai
ORGANIZATIONS

Other API from arcee-ai

huggingface.co

Total runs: 19.8K
Run Growth: -3.2K
Growth Rate: -16.29%
Updated:May 29 2026
huggingface.co

Total runs: 11.4K
Run Growth: 244
Growth Rate: 2.15%
Updated:September 18 2025
huggingface.co

Total runs: 4.3K
Run Growth: -10.0K
Growth Rate: -245.89%
Updated:September 18 2025
huggingface.co

Total runs: 571
Run Growth: -86
Growth Rate: -14.78%
Updated:July 22 2024
huggingface.co

Total runs: 210
Run Growth: 156
Growth Rate: 64.46%
Updated:June 03 2025
huggingface.co

Total runs: 190
Run Growth: 98
Growth Rate: 51.58%
Updated:July 19 2024
huggingface.co

Total runs: 181
Run Growth: 135
Growth Rate: 74.59%
Updated:June 11 2025
huggingface.co

Total runs: 170
Run Growth: 6
Growth Rate: 3.51%
Updated:August 01 2024
huggingface.co

Total runs: 153
Run Growth: 91
Growth Rate: 59.48%
Updated:February 27 2025
huggingface.co

Total runs: 125
Run Growth: 86
Growth Rate: 68.25%
Updated:September 10 2024
huggingface.co

Total runs: 118
Run Growth: 68
Growth Rate: 55.28%
Updated:January 16 2026