Instructions to use China-NCTIEDA/ChipExpert-8B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use China-NCTIEDA/ChipExpert-8B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="China-NCTIEDA/ChipExpert-8B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("China-NCTIEDA/ChipExpert-8B-Instruct") model = AutoModelForCausalLM.from_pretrained("China-NCTIEDA/ChipExpert-8B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use China-NCTIEDA/ChipExpert-8B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "China-NCTIEDA/ChipExpert-8B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "China-NCTIEDA/ChipExpert-8B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/China-NCTIEDA/ChipExpert-8B-Instruct
- SGLang
How to use China-NCTIEDA/ChipExpert-8B-Instruct 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 "China-NCTIEDA/ChipExpert-8B-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "China-NCTIEDA/ChipExpert-8B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "China-NCTIEDA/ChipExpert-8B-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "China-NCTIEDA/ChipExpert-8B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use China-NCTIEDA/ChipExpert-8B-Instruct with Docker Model Runner:
docker model run hf.co/China-NCTIEDA/ChipExpert-8B-Instruct
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("China-NCTIEDA/ChipExpert-8B-Instruct")
model = AutoModelForCausalLM.from_pretrained("China-NCTIEDA/ChipExpert-8B-Instruct")
messages = [
{"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))ChipExpert-8B-Instruct
The First Open-Source Integrated-Circuit-Design-Specific Large Language Model.
Introduction:
ChipExpert is the first open-source, instructional LLM dedicated to the Integrated-Circuit-Design industry, covering knowledge across multiple sub-domains, including analog circuits, digital circuits, radio frequency (RF), semiconductor devices, electronic design automation (EDA), system-on-chip (SoC), computing-in-memory, and more. This model aims to provide teaching assistant services for students in the field of IC to learn fundamental knowledge, engineers to inquire about technical details, and researchers to investigate cutting-edge papers and research topics. The ultimate goal of this model is to help the integrated circuit industry reduce the learning barrier and lower the training costs.
Key Features:
- The first Large Language Model (LLM) in the IC design field.
- A professional corpus covering ten specialized areas of IC design.
- Achieves superior performance in both foundational and cutting-edge knowledge compared to general LLMs.
Contributions
This project is the result of a collaborative effort:
Ning Xu1,2 Zhaoyang Zhang1,2 Lei Qi1,2 Wensuo Wang1 Chao Zhang1 Zihao Ren2
Huaiyuan Zhang2 Yanqi Zhang2 Zhichao Liu2 Xing Wang2 Qingwen Wei2 Shiyang Wu2
Lanlan Yang2 Xin Geng2 Yuchen Ma2 Yutong Zhang2 Mengyao Kong2
Zhican Zhang2 Shiyang Wu2 Yao Wang2 Lanlan Yang1 Chen Yang1
Qianfeng Lu2 Yiqun Ma2 Zhengxuan Wang2 Yaoyao Xu2 Chengjie Liu1
Mengyao Zhao2 Junbo Liu2 Yufan Song1 Yuejian Shi2 Jun Yang1,2
1National Center of Technology Innovation for EDA, Nanjing, China
2Southeast University, Nanjing, China
Model Description
- Developed by: NCTIEDA (National Center of Technology Innovation for EDA) and Southeast University
- Model type: Instruction Model
- Language(s): English
- License: Apache License 2.0
- Finetuned from model: Llama 3
Out-of-Scope Use
This is the first version of ChipExpert, more capable versions with enhanced abilities will be released soon.
Citation
If you find our work helpful, please consider citing the following paper:
@article{chipexpert2024,
title={ChipExpert: The First Open-Source Integrated-Circuit-Design-Specific Large Language Model},
author={Ning Xu, ZhaoyangZhang et al.},
journal={arXiv preprint arXiv:2024.xxxxx},
year={2024}
}
Model Card Contact
- Downloads last month
- 6
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="China-NCTIEDA/ChipExpert-8B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)