Text Generation
Transformers
Safetensors
NeMo
llama
domain-adaptive-pretraining
chip-design
text-generation-inference
Instructions to use tocsa/llama2-7b-dapt-chipdesign with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tocsa/llama2-7b-dapt-chipdesign with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tocsa/llama2-7b-dapt-chipdesign")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tocsa/llama2-7b-dapt-chipdesign") model = AutoModelForCausalLM.from_pretrained("tocsa/llama2-7b-dapt-chipdesign", device_map="auto") - NeMo
How to use tocsa/llama2-7b-dapt-chipdesign with NeMo:
# tag did not correspond to a valid NeMo domain.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tocsa/llama2-7b-dapt-chipdesign with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tocsa/llama2-7b-dapt-chipdesign" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tocsa/llama2-7b-dapt-chipdesign", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tocsa/llama2-7b-dapt-chipdesign
- SGLang
How to use tocsa/llama2-7b-dapt-chipdesign 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 "tocsa/llama2-7b-dapt-chipdesign" \ --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": "tocsa/llama2-7b-dapt-chipdesign", "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 "tocsa/llama2-7b-dapt-chipdesign" \ --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": "tocsa/llama2-7b-dapt-chipdesign", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tocsa/llama2-7b-dapt-chipdesign with Docker Model Runner:
docker model run hf.co/tocsa/llama2-7b-dapt-chipdesign
Llama-2-7B + domain-adaptive pretraining (chip-design corpus: Wikipedia/GitHub/arXiv, see 01_data_curation and 03_domain_adaptive_pretraining). Base checkpoint: meta-llama/Llama-2-7b-hf. Not chained with the SFT repo below.
- Downloads last month
- -
Model tree for tocsa/llama2-7b-dapt-chipdesign
Base model
meta-llama/Llama-2-7b-hf