diff --git a/README.md b/README.md index 901fc66..bab9995 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ SemiKong is an open-source semiconductor AI project that combines: -- a semiconductor language model in [model/](/Users/ctn/src/aitomatic/semikong/model) -- a semiconductor ontology and knowledge graph in [ontology/](/Users/ctn/src/aitomatic/semikong/ontology) +- a semiconductor language model in [model/](model/) +- a semiconductor ontology and knowledge graph in [ontology/](ontology/) SemiKong began as an early open effort to build a semiconductor-specific language model from real industry collaboration. Publicly, it was presented through the AI Alliance ecosystem with contributions from Aitomatic, Tokyo Electron, FPT, and others, and later described by the AI Alliance as its first domain-specific open model. @@ -56,20 +56,21 @@ make -C model infer Key model entry points: -- [model/README.md](/Users/ctn/src/aitomatic/semikong/model/README.md) -- [model/INSTALL.md](/Users/ctn/src/aitomatic/semikong/model/INSTALL.md) -- [model/Makefile](/Users/ctn/src/aitomatic/semikong/model/Makefile) +- [model/README.md](model/README.md) +- [model/INSTALL.md](model/INSTALL.md) +- [model/USAGE.md](model/USAGE.md) +- [model/Makefile](model/Makefile) If you want to work with the ontology: -- [ontology/README.md](/Users/ctn/src/aitomatic/semikong/ontology/README.md) -- [ontology/MANIFESTO.md](/Users/ctn/src/aitomatic/semikong/ontology/MANIFESTO.md) -- [ontology/ontology/README.md](/Users/ctn/src/aitomatic/semikong/ontology/ontology/README.md) +- [ontology/README.md](ontology/README.md) +- [ontology/MANIFESTO.md](ontology/MANIFESTO.md) +- [ontology/ontology/README.md](ontology/ontology/README.md) ## Repository Guide -- [model/](/Users/ctn/src/aitomatic/semikong/model) contains the language model code, configs, docs, and references -- [ontology/](/Users/ctn/src/aitomatic/semikong/ontology) contains the ontology modules, shapes, curation materials, and ontology docs +- [model/](model/) contains the language model code, configs, docs, and references +- [ontology/](ontology/) contains the ontology modules, shapes, curation materials, and ontology docs ## Why This Project Matters @@ -84,7 +85,7 @@ SemiKong is aimed at that gap. ## License -The repository code and checked-in contents are distributed under the [MIT License](/Users/ctn/src/aitomatic/semikong/LICENSE). +The repository code and checked-in contents are distributed under the [MIT License](LICENSE). Some model weights, datasets, and imported ontology assets may also carry upstream licenses or provenance-specific terms. diff --git a/model/INSTALL.md b/model/INSTALL.md index a8bd10b..283753d 100644 --- a/model/INSTALL.md +++ b/model/INSTALL.md @@ -4,6 +4,8 @@ This guide covers the current contents of the `model/` subtree. This documentation dedicated to instruct on how to setup the environment for training, evaluation and inference SEMIKONG model. +For runnable commands after installation, see [USAGE.md](USAGE.md). + ## Requirement Hardware - CUDA Version: use a current NVIDIA driver/runtime compatible with the PyTorch version pinned in `model/requirements.txt` @@ -30,6 +32,21 @@ conda activate semikong-env make -C model install ~~~ +## Supported Package Versions + +The current dependency baseline in [requirements.txt](requirements.txt) includes: + +- `torch==2.8.0` +- `torchaudio==2.8.0` +- `torchvision==0.23.0` +- `datasets` +- `transformers` +- `flash_attn` +- `vllm` +- `vllm-flash-attn` + +If you need a reproducible environment for debugging install issues, start from that file rather than mixing older PyTorch and torchaudio pins. + ## Training ~~~ 1. Download the Meta-LLaMA/Meta-LLaMA base model first on HuggingFace Hub @@ -49,3 +66,9 @@ python -m vllm.entrypoints.openai.api_server --model --device cuda --max-lora-rank 32 --dtype auto --port 8080 ~~~ + +## References + +- Usage guide: [USAGE.md](USAGE.md) +- Dataset and benchmark resources: +- Tech report / paper: diff --git a/model/README.md b/model/README.md index 040b333..e899fb6 100644 --- a/model/README.md +++ b/model/README.md @@ -17,7 +17,11 @@ The top-level repository is being organized around two major areas: ## Quick Links - Dataset and benchmarks: -- Model weights: , +- Public model weights: + - Base 70B: + - Quantized 8B GPTQ: + - Quantized 8B instruct GPTQ: +- Instruct chat API: launch with `python -m vllm.entrypoints.openai.api_server ...` as shown in [USAGE.md](USAGE.md) - Paper: ## Papers @@ -36,10 +40,11 @@ The top-level repository is being organized around two major areas: ## Start Here -- Setup and environment: [INSTALL.md](/Users/ctn/src/aitomatic/semikong/model/INSTALL.md) -- Commands: [Makefile](/Users/ctn/src/aitomatic/semikong/model/Makefile) -- Training config: [configs/training-config.yaml](/Users/ctn/src/aitomatic/semikong/model/configs/training-config.yaml) -- Inference config: [configs/inference-config.yaml](/Users/ctn/src/aitomatic/semikong/model/configs/inference-config.yaml) +- Setup and environment: [INSTALL.md](INSTALL.md) +- Usage and serving: [USAGE.md](USAGE.md) +- Commands: [Makefile](Makefile) +- Training config: [configs/training-config.yaml](configs/training-config.yaml) +- Inference config: [configs/inference-config.yaml](configs/inference-config.yaml) ## How To Use @@ -53,14 +58,14 @@ make -C model infer If you need to change paths or parameters first, edit: -- [configs/training-config.yaml](/Users/ctn/src/aitomatic/semikong/model/configs/training-config.yaml) -- [configs/inference-config.yaml](/Users/ctn/src/aitomatic/semikong/model/configs/inference-config.yaml) +- [configs/training-config.yaml](configs/training-config.yaml) +- [configs/inference-config.yaml](configs/inference-config.yaml) ## Documentation -- Project overview and model summary: [docs/overview.md](/Users/ctn/src/aitomatic/semikong/model/docs/overview.md) -- Ecosystem, deployment, and references: [docs/ecosystem.md](/Users/ctn/src/aitomatic/semikong/model/docs/ecosystem.md) -- Governance, contributions, disclaimer, and license notes: [docs/governance.md](/Users/ctn/src/aitomatic/semikong/model/docs/governance.md) +- Project overview and model summary: [docs/overview.md](docs/overview.md) +- Ecosystem, deployment, and references: [docs/ecosystem.md](docs/ecosystem.md) +- Governance, contributions, disclaimer, and license notes: [docs/governance.md](docs/governance.md) ## License diff --git a/model/USAGE.md b/model/USAGE.md new file mode 100644 index 0000000..23c07d4 --- /dev/null +++ b/model/USAGE.md @@ -0,0 +1,88 @@ +# Using the SEMIKONG Model + +This guide covers the intended command paths for training, local inference, and vLLM serving. + +## Quick Start + +From the repository root: + +```bash +make -C model install +make -C model train +make -C model infer +``` + +Before running those commands, update: + +- [configs/training-config.yaml](configs/training-config.yaml) +- [configs/inference-config.yaml](configs/inference-config.yaml) + +At minimum, set the paths for the base model, adapter output, and local dataset. + +## Training + +The supported training entrypoint is: + +```bash +make -C model train +``` + +That target runs: + +```bash +python model/training/train.py --config model/configs/training-config.yaml +``` + +Expected inputs: + +- a local base model checkpoint +- a local instruction-style dataset +- a writable output directory for checkpoints and adapters + +## Local Inference + +The supported inference entrypoint is: + +```bash +make -C model infer +``` + +That target runs: + +```bash +python model/inference/raw_inference.py --config model/configs/inference-config.yaml +``` + +Use this path for direct local generation against a configured base model and adapter. + +## vLLM Serving + +For an OpenAI-compatible API server: + +```bash +python -m vllm.entrypoints.openai.api_server \ + --model \ + --dtype auto \ + --max-lora-rank 32 \ + --api-key token-abc123 +``` + +For the vLLM API server endpoint: + +```bash +python -m vllm.entrypoints.api_server \ + --model \ + --device cuda \ + --max-lora-rank 32 \ + --dtype auto \ + --port 8080 +``` + +## Models, Datasets, and Paper + +- Public model weights: + - Base 70B: + - Quantized 8B GPTQ: + - Quantized 8B instruct GPTQ: +- Dataset and benchmark resources: +- Tech report / paper: diff --git a/ontology/README.md b/ontology/README.md index 1996724..7107ef1 100644 --- a/ontology/README.md +++ b/ontology/README.md @@ -18,11 +18,11 @@ We intend to contribute the SemiKong ontology work into the broader SEMI standar ## What Is Here -- ontology modules in Turtle under [ontology/ontology/](/Users/ctn/src/aitomatic/semikong/ontology/ontology) -- architecture and methodology docs under [ontology/docs/](/Users/ctn/src/aitomatic/semikong/ontology/docs) -- SHACL shapes under [ontology/shapes/](/Users/ctn/src/aitomatic/semikong/ontology/shapes) -- examples under [ontology/examples/](/Users/ctn/src/aitomatic/semikong/ontology/examples) -- curation and ontologist workflow materials under [ontology/ontologist/](/Users/ctn/src/aitomatic/semikong/ontology/ontologist) +- ontology modules in Turtle under [ontology/ontology/](ontology/) +- architecture and methodology docs under [ontology/docs/](docs/) +- SHACL shapes under [ontology/shapes/](shapes/) +- examples under [ontology/examples/](examples/) +- curation and ontologist workflow materials under [ontology/ontologist/](ontologist/) ## Design Intent @@ -37,12 +37,12 @@ This aligns with the original `semicont` direction and now serves as the ontolog ## Start Here -- manifesto: [MANIFESTO.md](/Users/ctn/src/aitomatic/semikong/ontology/MANIFESTO.md) -- commands: [Makefile](/Users/ctn/src/aitomatic/semikong/ontology/Makefile) -- ontology source overview: [ontology/ontology/README.md](/Users/ctn/src/aitomatic/semikong/ontology/ontology/README.md) -- architecture: [ontology/docs/architecture.md](/Users/ctn/src/aitomatic/semikong/ontology/docs/architecture.md) -- industry hierarchy: [ontology/docs/semiconductor-industry-ontology-hierarchy.md](/Users/ctn/src/aitomatic/semikong/ontology/docs/semiconductor-industry-ontology-hierarchy.md) -- ontologist workflow: [ontology/ontologist/README.md](/Users/ctn/src/aitomatic/semikong/ontology/ontologist/README.md) +- manifesto: [MANIFESTO.md](MANIFESTO.md) +- commands: [Makefile](Makefile) +- ontology source overview: [ontology/ontology/README.md](ontology/README.md) +- architecture: [ontology/docs/architecture.md](docs/architecture.md) +- industry hierarchy: [ontology/docs/semiconductor-industry-ontology-hierarchy.md](docs/semiconductor-industry-ontology-hierarchy.md) +- ontologist workflow: [ontology/ontologist/README.md](ontologist/README.md) ## How To Use @@ -62,7 +62,7 @@ The imported ontology currently includes: - industry-layer modules such as integrators, EDA, foundry/IDM, OSAT, WFE, materials, and supply chain - validation shapes and curation assets -The canonical semantic source remains the Turtle content under [ontology/ontology/](/Users/ctn/src/aitomatic/semikong/ontology/ontology). +The canonical semantic source remains the Turtle content under [ontology/ontology/](ontology/). ## Contributor Signal @@ -72,4 +72,4 @@ Initial contributor called out in the imported ontology materials: ## License Note -The imported ontology subtree includes its own [ontology/LICENSE](/Users/ctn/src/aitomatic/semikong/ontology/LICENSE). The repository as a whole is MIT-licensed at the top level, but ontology assets may also carry their own preserved licensing and provenance context from the imported source. +The imported ontology subtree includes its own [ontology/LICENSE](LICENSE). The repository as a whole is MIT-licensed at the top level, but ontology assets may also carry their own preserved licensing and provenance context from the imported source.