Text Generation
Transformers
Safetensors
English
llama
knowledge-distillation
causal-lm
openwebtext
wikitext
transfer-learning
text-generation-inference
Instructions to use HenryHHHH/DistilLlamaV1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HenryHHHH/DistilLlamaV1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HenryHHHH/DistilLlamaV1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HenryHHHH/DistilLlamaV1") model = AutoModelForCausalLM.from_pretrained("HenryHHHH/DistilLlamaV1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HenryHHHH/DistilLlamaV1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HenryHHHH/DistilLlamaV1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HenryHHHH/DistilLlamaV1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/HenryHHHH/DistilLlamaV1
- SGLang
How to use HenryHHHH/DistilLlamaV1 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 "HenryHHHH/DistilLlamaV1" \ --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": "HenryHHHH/DistilLlamaV1", "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 "HenryHHHH/DistilLlamaV1" \ --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": "HenryHHHH/DistilLlamaV1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use HenryHHHH/DistilLlamaV1 with Docker Model Runner:
docker model run hf.co/HenryHHHH/DistilLlamaV1
Commit History
-
Update README.md
Verified signature05554a6 -
Upload folder using huggingface_hub
Verified signature9b0f6db
-
Update README.md
Verified signaturee7e8fb7 -
Update README.md
Verified signature3d56cd2 -
Create README.md
Verified signaturee2ad4c8 -
Create README.md
Verified signature--- language: en tags: - text-generation - knowledge-distillation - llama - causal-lm - openwebtext - wikitext - transfer-learning model_name: DistilLLaMA license: apache-2.0 datasets: - openwebtext - wikitext parameter_count: 80M metrics: - cosine-similarity - exact-match - rouge library_name: transformers base_model: meta-llama/LLaMA-2-7B --- ### Overview This model is a distilled version of LLaMA 2, containing approximately 80 million parameters. It was trained using a mix of OpenWebText and WikiText Raw V1 datasets. Knowledge distillation was employed to transfer knowledge from a larger "teacher" model—Meta’s 7B LLaMA 2—to help this smaller model mimic the behavior of the teacher. ### Model Architecture The architecture is based on LLaMA 2, with the following parameters: | Parameter | Value | |-------------------------|-------| | Hidden Dimension | 512 | | Intermediate Dimension | 1536 | | Max Positional Embeddings | 128 | | A…fdb368b -
Upload folder using huggingface_hub
Verified signature3fff4f8 -
initial commit
Verified signature67b14cc