-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #365 from aitomatic/examples/semiconductor-etching…
…-yieldguard add examples/semiconductor-etching-yieldguard
- Loading branch information
Showing
15 changed files
with
388 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
HF_API_KEY=[... HuggingFace API key if running HuggingFace-hosted models ...] | ||
OPENAI_API_KEY=[... OpenAI API key if running on OpenAI services ...] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# environment variables | ||
.env | ||
|
||
# Streamlit secrets | ||
.streamlit/secrets.toml |
2 changes: 2 additions & 0 deletions
2
examples/semiconductor-etching-yieldguard/.streamlit/secrets.toml.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
HF_API_KEY = '[... HuggingFace API key if running HuggingFace-hosted models ...]' | ||
OPENAI_API_KEY = '[... OpenAI API key if running on OpenAI services ...]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
streamlit-run: | ||
@poetry run streamlit run streamlit-main.py --server.allowRunOnSave=true --server.runOnSave=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!-- markdownlint-disable MD013 MD043 --> | ||
|
||
# Semiconductor Etching YieldGuard | ||
|
||
## How to Run This Example | ||
|
||
Install OpenSSA repo beforehand by running `make install` (or `.\make install` on Windows) | ||
at the OpenSSA repo root directory. | ||
|
||
In this example's directory: | ||
|
||
- Necessary credentials need to be in the `.env` file | ||
|
||
- DANA problem-solving can be run by `make dana-solve prob="..."` (or `.\make dana-solve "..."` on Windows) | ||
|
||
- Streamlit app can be run by `make streamlit-run` (or `.\make streamlit-run` on Windows) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
from argparse import ArgumentParser | ||
from functools import cache | ||
from pathlib import Path | ||
|
||
from dotenv import load_dotenv | ||
import yaml | ||
|
||
from openssa import DANA, ProgramStore, HTP, HTPlanner, FileResource, HuggingFaceLM | ||
|
||
# pylint: disable=wrong-import-order | ||
from semikong_lm import SemiKongLM | ||
|
||
|
||
load_dotenv() | ||
|
||
|
||
BASE_DIR: Path = Path(__file__).parent | ||
|
||
DATA_DIR_PATH: Path = BASE_DIR / 'data' | ||
|
||
EXPERTISE_DIR_PATH: Path = BASE_DIR / 'expertise' | ||
|
||
EXPERT_KNOWLEDGE_FILE_PATH: Path = EXPERTISE_DIR_PATH / 'expert-knowledge.txt' | ||
with open(file=EXPERT_KNOWLEDGE_FILE_PATH, | ||
buffering=-1, | ||
encoding='utf-8', | ||
errors='strict', | ||
newline=None, | ||
closefd=True, | ||
opener=None) as f: | ||
EXPERT_KNOWLEDGE: str = f.read() | ||
|
||
EXPERT_PROGRAMS_FILE_PATH: Path = EXPERTISE_DIR_PATH / 'expert-programs.yml' | ||
with open(file=EXPERT_PROGRAMS_FILE_PATH, | ||
buffering=-1, | ||
encoding='utf-8', | ||
errors='strict', | ||
newline=None, | ||
closefd=True, | ||
opener=None) as f: | ||
EXPERT_PROGRAMS: dict[str, dict] = yaml.safe_load(stream=f) | ||
|
||
|
||
@cache | ||
def get_or_create_dana(use_semikong_lm: bool = True, max_depth=2, max_subtasks_per_decomp=4) -> DANA: | ||
lm = (SemiKongLM if use_semikong_lm else HuggingFaceLM).from_defaults() | ||
|
||
program_store = ProgramStore(lm=lm) | ||
if EXPERT_PROGRAMS: | ||
for program_name, htp_dict in EXPERT_PROGRAMS.items(): | ||
htp = HTP.from_dict(htp_dict) | ||
program_store.add_or_update_program(name=program_name, description=htp.task.ask, program=htp) | ||
|
||
return DANA(knowledge={EXPERT_KNOWLEDGE}, | ||
program_store=program_store, | ||
programmer=HTPlanner(lm=lm, max_depth=max_depth, max_subtasks_per_decomp=max_subtasks_per_decomp), | ||
resources={FileResource(path=DATA_DIR_PATH, re_index=True)}) | ||
|
||
|
||
if __name__ == '__main__': | ||
arg_parser = ArgumentParser() | ||
arg_parser.add_argument('problem') | ||
args = arg_parser.parse_args() | ||
|
||
print(get_or_create_dana().solve(problem=args.problem)) |
11 changes: 11 additions & 0 deletions
11
examples/semiconductor-etching-yieldguard/data/measurement-data.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
WaterBatch: 1, 2, 3, 4, 5, 6 | ||
|
||
ReflectedPower_W: 36.6, 35.4, 37.5, 40.1, 42.3, 37.9 | ||
|
||
ForwardPower_W: 60.0, 58.0, 58.2, 57.8, 65.3, 60.0 | ||
|
||
ChamberPressure_Torr: 3.89, 4.18, 3.85, 4.22, 4.25, 3.53 | ||
|
||
GasFlowRate_sccm: 59.7, 58.1, 56.2, 55.1, 59.7, 54.4 | ||
|
||
ChamberWallTemperature_C: 76.3, 78.3, 76.6, 79.6, 81.7, 81.9 |
93 changes: 93 additions & 0 deletions
93
examples/semiconductor-etching-yieldguard/expertise/expert-knowledge.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
SEMICONDUCTOR ETCHING EQUIPMENT MONITORING, MAINTENANCE & OPTIMIZATION | ||
====================================================================== | ||
|
||
|
||
RF Power Fluctuation Rule | ||
------------------------- | ||
HEURISTIC: If the reflected power in the TEL Tactras RLSA Etcher increases by more than 5% for three consecutive wafers, | ||
and the forward power adjustment exceeds 10%, this suggests possible electrode erosion or plasma instability. | ||
|
||
ACTION: Alert the maintenance engineer to inspect the electrodes and adjust gas flow or power settings, | ||
potentially avoiding costly equipment downtime. | ||
|
||
|
||
Pressure Stability Monitoring | ||
----------------------------- | ||
HEURISTIC: If the chamber pressure deviation exceeds ±3% for more than 30 seconds during steady-state etching, | ||
coupled with a gas flow variation of more than 5%, it indicates potential chamber wall coating or residue buildup. | ||
|
||
ACTION: Recommend a preventative chamber clean and adjust the gas flow to stabilize pressure, | ||
reducing the likelihood of non-uniform etching. | ||
|
||
|
||
Temperature-Dependent Chamber Cleaning Optimization | ||
--------------------------------------------------- | ||
HEURISTIC: If the chamber wall temperature shows a steady increase of 2°C over three lots, | ||
despite maintaining the same power settings, it indicates polymer build-up on the chamber walls. | ||
|
||
ACTION: Suggest adjusting the chamber clean cycle frequency and alerts engineers to check the wall lining. | ||
Automated cleaning recommendations can significantly reduce variation and increase yield. | ||
|
||
|
||
Etch Rate Uniformity Rule | ||
------------------------- | ||
HEURISTIC: If the etch rate between the wafer center and edge varies by more than 7% for three consecutive lots, | ||
this could indicate gas flow distribution issues or hardware alignment issues within the TEL Tactras system. | ||
|
||
ACTION: Alert the process engineer to investigate gas flow uniformity | ||
and suggests optimizing flow parameters or performing a hardware realignment. | ||
|
||
|
||
Chamber Matching Network Heuristic | ||
---------------------------------- | ||
HEURISTIC: If the chamber matching network requires more than two adjustments per wafer run | ||
to maintain desired RF power settings, it suggests possible impedance mismatch or degradation in the matching components. | ||
|
||
ACTION: Optimize matching network settings and recommend maintenance | ||
if impedance mismatch trends persist, potentially preventing plasma stability issues. | ||
|
||
|
||
Microloading Effect Detection | ||
----------------------------- | ||
HEURISTIC: If the etch rate is higher in areas with smaller feature densities compared to high-density areas | ||
(indicative of the microloading effect), and the difference exceeds a set threshold, | ||
this can lead to non-uniform etching and yield loss. | ||
|
||
ACTION: Alert engineers to optimize gas flow and power settings based on specific wafer feature density, | ||
enhancing etch uniformity across wafers. | ||
|
||
|
||
Real-Time Recipe Adjustment Based on Yield Data | ||
----------------------------------------------- | ||
HEURISTIC: If yield data shows a consistent defect pattern (e.g., at the wafer edge or specific die locations) | ||
for more than 5% of wafers, correlate this with historical process parameters and makes real-time recipe adjustments. | ||
|
||
ACTION: Automated recipe optimization based on yield trends can reduce defect occurrence, | ||
improving overall productivity and wafer quality. | ||
|
||
|
||
Anomaly Detection with Historical Baseline Comparison | ||
----------------------------------------------------- | ||
HEURISTIC: If real-time sensor data (e.g., temperature, pressure, RF power) shows deviations | ||
outside historical baseline ranges for similar recipes, this could indicate tool degradation or unexpected chamber behavior. | ||
|
||
ACTION: Trigger alerts and suggest corrective actions such as parameter adjustment or additional inspections, | ||
preventing potential faults. | ||
|
||
|
||
Particle Generation Control for Bevel Etching | ||
--------------------------------------------- | ||
HEURISTIC: If particle count in the bevel area increases beyond acceptable limits during bevel etching | ||
in the Tactras UDEMAE system, this suggests non-uniform edge plasma distribution or excessive material removal. | ||
|
||
ACTION: Recommend reducing RF power or modifying gas flow in the bevel area, | ||
significantly reducing the risk of yield-impacting particle contamination. | ||
|
||
|
||
Multi-Parameter Fault Isolation for Complex Equipment | ||
----------------------------------------------------- | ||
HEURISTIC: If multiple parameters (e.g., RF power, pressure, temperature) show simultaneous deviations | ||
outside standard operating windows, use historical fault isolation data to pinpoint the most likely root cause. | ||
|
||
ACTION: Provide a ranked list of potential root causes with confidence levels, | ||
enabling faster and more accurate fault isolation. |
72 changes: 72 additions & 0 deletions
72
examples/semiconductor-etching-yieldguard/expertise/expert-programs.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
rf-power-fluctuation-monitoring: | ||
task: |- | ||
Monitor RF Power fluctuation and recommend inspection/maintenance actions if fluctuation is excessive | ||
sub-htps: | ||
- task: >- | ||
What are the values of Reflected Power in the recent data? | ||
- task: |- | ||
Analyze whether the lowest and highest Reflected Power values differ by more than 15%. | ||
If so, note down the corresponding wafer batch number range between them. | ||
- task: >- | ||
What are the values of Forward Power in the recent data? | ||
- task: |- | ||
Analyze whether the lowest and highest Forward Power values differ by more than 10%. | ||
If so, note down the corresponding wafer batch number range between them. | ||
- task: |- | ||
If there are excessive fluctuations in both Reflected Power and Forward Power in the previous analyses, | ||
and if the wafer batch number ranges overlap, report a RF Power Fluctuation problem, | ||
and recommend the following maintenance actions: | ||
- Inspect the electrodes | ||
- Adjust gas flow | ||
- Adjust power settings | ||
pressure-instability-monitoring: | ||
task: |- | ||
Monitor Chamber Pressure fluctuation and recommend inspection/maintenance actions if fluctuation is excessive | ||
sub-htps: | ||
- task: >- | ||
What are the values of Chamber Pressure in the recent data? | ||
- task: |- | ||
Analyze whether there are consecutive Chamber Pressure values differing by at least 3%. | ||
If so, note down the corresponding wafer batch numbers. | ||
- task: >- | ||
What are the values of Gas Flow Rate in the recent data? | ||
- task: |- | ||
Analyze whether there are consecutive Gas Flow Rate values differing by at least 5%. | ||
If so, note down the corresponding wafer batch numbers. | ||
- task: |- | ||
If there are excessive fluctuations in both Chamber Pressure and Gas Flow Rate in the previous analyses, | ||
and if the wafer batch numbers contain some same batch(es), report a Pressure Instability problem, | ||
and recommend the following maintenance actions: | ||
- Preventative chamber cleaning | ||
- Adjustment of the gas flow to stabilize pressure | ||
chamber-temperature-monitoring: | ||
task: |- | ||
Monitor Chamber Temperature increases and recommend inspection/maintenance actions if heating is excessive | ||
sub-htps: | ||
- task: >- | ||
What are the values of Chamber Temperature in the recent data? | ||
- task: |- | ||
Analyze whether there are 3 consecutive Chamber Temperature values | ||
showing increases of at least 2 Celcius degrees from first to second and from second to third | ||
- task: |- | ||
If there is/are significant Chamber Temperature increase(s) identified in the previous analysis, | ||
recommend the following maintenance actions: | ||
- Adjustment of chamber clean frequency | ||
- Alerting engineers to check wall lining for polymer build-up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
@echo off | ||
|
||
|
||
:: TARGETS | ||
:: ======= | ||
SET TARGET=%1 | ||
|
||
IF "%TARGET%"=="streamlit-run" GOTO streamlit-run | ||
|
||
|
||
:: STREAMLIT APP | ||
:: ============= | ||
:streamlit-run | ||
poetry run streamlit run streamlit-main.py --server.allowRunOnSave=true --server.runOnSave=true | ||
GOTO end | ||
|
||
|
||
:: END | ||
:: === | ||
:end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
WaterBatch,ForwardPower_W,ReflectedPower_W,ChamberPressure_Torr,GasFlowRate_sccm,ChamberWallTemperature_C | ||
1,59.8658484197038,36.58009357302478,3.8912139968434072,59.656320330745594,76.29389990800009 | ||
2,58.16704785825934,35.38252446429568,4.178602163853312,58.08397348116461,78.31261142176992 | ||
3,58.166955288079336,37.50547593215342,3.850684781489443,56.22890595323773,76.55855538044706 | ||
4,57.79118453875756,40.13085924740417,4.2179458479297685,55.054858831268945,79.60034010588906 | ||
5,65.30403852879604,42.33805650601139,4.250891926683164,59.68444677837765,81.7335513967164 | ||
6,59.87527628850847,37.941053938071626,3.5335182210508873,54.40152493739601,81.92427227762764 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
OpenSSA[contrib] @ https://GitHub.com/Aitomatic/OpenSSA/archive/main.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from __future__ import annotations | ||
|
||
from argparse import ArgumentParser | ||
from dataclasses import dataclass | ||
|
||
from openssa.core.util.lm.llama import LlamaLM | ||
|
||
|
||
DEFAULT_MODEL = 'pentagoniac/SEMIKONG-70B' | ||
DEFAULT_API_KEY = '...' | ||
DEFAULT_API_BASE = 'http://34.44.90.64:8081/v1' | ||
|
||
|
||
@dataclass | ||
class SemiKongLM(LlamaLM): | ||
"""SemiKong LM.""" | ||
|
||
@classmethod | ||
def from_defaults(cls) -> SemiKongLM: | ||
"""Get default SemiKong LM instance.""" | ||
# pylint: disable=unexpected-keyword-arg | ||
return cls(model=DEFAULT_MODEL, api_key=DEFAULT_API_KEY, api_base=DEFAULT_API_BASE) | ||
|
||
|
||
if __name__ == '__main__': | ||
arg_parser = ArgumentParser() | ||
arg_parser.add_argument('question') | ||
args = arg_parser.parse_args() | ||
|
||
print(SemiKongLM.from_defaults().get_response(prompt=args.question)) |
Oops, something went wrong.