Text Generation
Transformers
Safetensors
llama
flashnorm
transformer-tricks
efficient-inference
weightless-rmsnorm
text-generation-inference
Run this model with HF Jobs
Run open-machine/Llama-3.2-1B-FlashNorm on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/open-machine/Llama-3.2-1B-FlashNorm. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/open-machine/Llama-3.2-1B-FlashNorm on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/open-machine/Llama-3.2-1B-FlashNorm. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/open-machine/Llama-3.2-1B-FlashNorm. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use open-machine/Llama-3.2-1B-FlashNorm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use open-machine/Llama-3.2-1B-FlashNorm with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="open-machine/Llama-3.2-1B-FlashNorm")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("open-machine/Llama-3.2-1B-FlashNorm") model = AutoModelForCausalLM.from_pretrained("open-machine/Llama-3.2-1B-FlashNorm", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use open-machine/Llama-3.2-1B-FlashNorm with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "open-machine/Llama-3.2-1B-FlashNorm" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "open-machine/Llama-3.2-1B-FlashNorm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/open-machine/Llama-3.2-1B-FlashNorm
- SGLang
How to use open-machine/Llama-3.2-1B-FlashNorm with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "open-machine/Llama-3.2-1B-FlashNorm" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "open-machine/Llama-3.2-1B-FlashNorm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "open-machine/Llama-3.2-1B-FlashNorm" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "open-machine/Llama-3.2-1B-FlashNorm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use open-machine/Llama-3.2-1B-FlashNorm with Docker Model Runner:
docker model run hf.co/open-machine/Llama-3.2-1B-FlashNorm
Add library_name and update model card (#1)
Browse files- Add library_name and update model card (ef5a0e4cc19eac803ad8a9cd00e7effdefe69c04)
Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>
123456789101112131415161737 unmodified lines55565758---license: llama3.2base_model: meta-llama/Llama-3.2-1Btags:- flashnorm- transformer-tricks- efficient-inference- weightless-rmsnormpipeline_tag: text-generation---# Llama-3.2-1B-FlashNormFlashNorm-prepared checkpoint of [meta-llama/Llama-3.2-1B](https://huggingface.co/meta-llama/Llama-3.2-1B). Mathematically equivalent to the source model. The per-channel RMSNorm weight tensors (`input_layernorm.weight`, `post_attention_layernorm.weight`, `model.norm.weight`) are folded into the following linear layers and then removed from the state dict entirely.> **Framework support note.** Stock vLLM currently does not load this checkpoint because the norm weight tensors are absent. The upstream patch to accept missing tensors is tracked at: **TBD (vLLM issue link)**. Until the patch lands, use HuggingFace Transformers; it loads this with a warning that norm weights were not initialized and defaults them to ones, which is the correct behavior for FlashNorm.37 unmodified lines## LicenseInherited from the source model.123456789101112131415161718192037 unmodified lines58596061---base_model: meta-llama/Llama-3.2-1Blibrary_name: transformerslicense: llama3.2pipeline_tag: text-generationtags:- flashnorm- transformer-tricks- efficient-inference- weightless-rmsnorm---# Llama-3.2-1B-FlashNormFlashNorm-prepared checkpoint of [meta-llama/Llama-3.2-1B](https://huggingface.co/meta-llama/Llama-3.2-1B). This model was presented in the paper [FlashNorm: Fast Normalization for Transformers](https://huggingface.co/papers/2407.09577).Mathematically equivalent to the source model. The per-channel RMSNorm weight tensors (`input_layernorm.weight`, `post_attention_layernorm.weight`, `model.norm.weight`) are folded into the following linear layers and then removed from the state dict entirely.> **Framework support note.** Stock vLLM currently does not load this checkpoint because the norm weight tensors are absent. The upstream patch to accept missing tensors is tracked at: **TBD (vLLM issue link)**. Until the patch lands, use HuggingFace Transformers; it loads this with a warning that norm weights were not initialized and defaults them to ones, which is the correct behavior for FlashNorm.37 unmodified lines## LicenseInherited from the source model.
README.md+11-8