ariG23498 / layer-skip-v1

huggingface.co
Total runs: 28
24-hour runs: 0
7-day runs: 2
30-day runs: 17
Model's Last Updated: December 27 2024
text-generation

Introduction of layer-skip-v1

Model Details of layer-skip-v1

class LayerSkipSFTTrainer(SFTTrainer):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.early_exit_layer = 0 # initialize with 0
        self.always_last_layer = True

    def compute_loss(self, model, inputs, return_outputs=False, num_items_in_batch=None):
        self.early_exit_layer = (self.early_exit_layer % (model.config.num_hidden_layers - 1)) + 1 # rotates between [1, num_hidden_layers-1]

        labels = inputs.pop("labels")
        outputs = model(**inputs, output_hidden_states=True)
        
        hidden_state = outputs["hidden_states"][self.early_exit_layer]
        logits = model.lm_head(hidden_state)
        loss = model.loss_function(logits=logits, labels=labels, vocab_size=model.vocab_size)
        
        if self.always_last_layer:
            loss = loss + model.loss_function(logits=outputs["logits"], labels=labels, vocab_size=model.vocab_size)
                
        return loss

Runs of ariG23498 layer-skip-v1 on huggingface.co

28
Total runs
0
24-hour runs
0
3-day runs
2
7-day runs
17
30-day runs

More Information About layer-skip-v1 huggingface.co Model

More layer-skip-v1 license Visit here:

https://choosealicense.com/licenses/llama3.2

layer-skip-v1 huggingface.co

layer-skip-v1 huggingface.co is an AI model on huggingface.co that provides layer-skip-v1's model effect (), which can be used instantly with this ariG23498 layer-skip-v1 model. huggingface.co supports a free trial of the layer-skip-v1 model, and also provides paid use of the layer-skip-v1. Support call layer-skip-v1 model through api, including Node.js, Python, http.

layer-skip-v1 huggingface.co Url

https://huggingface.co/ariG23498/layer-skip-v1

ariG23498 layer-skip-v1 online free

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

ariG23498 layer-skip-v1 online free url in huggingface.co:

https://huggingface.co/ariG23498/layer-skip-v1

layer-skip-v1 install

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

layer-skip-v1 install url in huggingface.co:

https://huggingface.co/ariG23498/layer-skip-v1

Url of layer-skip-v1

layer-skip-v1 huggingface.co Url

Provider of layer-skip-v1 huggingface.co

ariG23498
ORGANIZATIONS

Other API from ariG23498

huggingface.co

Total runs: 282
Run Growth: 126
Growth Rate: 44.84%
Updated:November 13 2025
huggingface.co

Total runs: 24
Run Growth: 18
Growth Rate: 75.00%
Updated:January 21 2025
huggingface.co

Total runs: 13
Run Growth: 8
Growth Rate: 61.54%
Updated:November 21 2024
huggingface.co

Total runs: 6
Run Growth: 0
Growth Rate: 0.00%
Updated:April 17 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 14 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:August 08 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 27 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 23 2025