Instructions to use cwoolee/blast-llama-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cwoolee/blast-llama-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cwoolee/blast-llama-4B", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("cwoolee/blast-llama-4B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use cwoolee/blast-llama-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cwoolee/blast-llama-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cwoolee/blast-llama-4B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cwoolee/blast-llama-4B
- SGLang
How to use cwoolee/blast-llama-4B 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 "cwoolee/blast-llama-4B" \ --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": "cwoolee/blast-llama-4B", "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 "cwoolee/blast-llama-4B" \ --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": "cwoolee/blast-llama-4B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cwoolee/blast-llama-4B with Docker Model Runner:
docker model run hf.co/cwoolee/blast-llama-4B
This contains the weights for the LLaMA-7b model. This model is under a non-commercial license (see the LICENSE file). You should only use this repository if you have been granted access to the model by filling out this form but either lost your copy of the weights or got some trouble converting them to the Transformers format.
Model Card for Model ID
Model Details
Model Description
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
- Developed by: Meta, Changwoo Lee, Soo Min Kwon, Qing Qu, Hun-Seok Kim
- Model type: Text Generation
- Language(s) (NLP): English
- License: This model inherited Llama License (see
LICENSE). - Finetuned from model: huggyllama/llama-7b
Model Sources
- Repository: https://github.com/changwoolee/BLAST
- Paper: Changwoo Lee, Soo Min Kwon, Qing Qu, and Hun-Seok Kim. "BLAST: Block Level Adaptive Structured Matrix for Efficient Deep Neural Network Inference." NeurIPS 2024
How to Get Started with the Model
Use the code below to get started with the model.
[More Information Needed]
Citation [optional]
BibTeX:
@inproceedings{
lee2024blast,
title={{BLAST}: Block-Level Adaptive Structured Matrices for Efficient Deep Neural Network Inference},
author={Lee, Changwoo and Kwon, Soo Min and Qu, Qing and Kim, Hun-Seok},
booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems},
year={2024},
}
- Downloads last month
- 2
Model tree for cwoolee/blast-llama-4B
Base model
huggyllama/llama-7b