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

huggingface.co
Total runs: 120
24-hour runs: 0
7-day runs: -5
30-day runs: 10
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

120
Total runs
0
24-hour runs
0
3-day runs
-5
7-day runs
10
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: 18.6K
Run Growth: -4.8K
Growth Rate: -25.97%
Updated:May 29 2026
huggingface.co

Total runs: 8.5K
Run Growth: -2.7K
Growth Rate: -31.30%
Updated:September 18 2025
huggingface.co

Total runs: 3.4K
Run Growth: -757
Growth Rate: -21.63%
Updated:September 18 2025
huggingface.co

Total runs: 516
Run Growth: -130
Growth Rate: -26.21%
Updated:October 10 2025
huggingface.co

Total runs: 260
Run Growth: 42
Growth Rate: 16.54%
Updated:June 03 2025
huggingface.co

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

Total runs: 178
Run Growth: -18
Growth Rate: -10.47%
Updated:July 19 2024
huggingface.co

Total runs: 171
Run Growth: 20
Growth Rate: 11.70%
Updated:February 27 2025
huggingface.co

Total runs: 161
Run Growth: -16
Growth Rate: -10.39%
Updated:August 01 2024
huggingface.co

Total runs: 147
Run Growth: 14
Growth Rate: 10.07%
Updated:September 10 2024
huggingface.co

Total runs: 136
Run Growth: 12
Growth Rate: 9.23%
Updated:January 16 2026