LLM-Engineers-Handbook
LLM 실전 가이드: 기초부터 LLMOps 모범 사례를 활용한 고급 LLM 및 RAG 애플리케이션의 AWS 배포까지
파일 탐색기
- cd.yaml
- ci.yaml
- settings.json
- 03_custom_odm_example.py
- 03_orm.py
- 08_instructor_embeddings.py
- 08_text_embeddings.py
- 08_text_image_embeddings.py
- digital_data_etl_maxime_labonne.yaml
- digital_data_etl_paul_iusztin.yaml
- end_to_end_data.yaml
- evaluating.yaml
- export_artifact_to_json.yaml
- feature_engineering.yaml
- generate_instruct_datasets.yaml
- generate_preference_datasets.yaml
- training.yaml
- cleaned_documents.json
- instruct_datasets.json
- preference_datasets.json
- raw_documents.json
- ArticleDocument.json
- PostDocument.json
- RepositoryDocument.json
- UserDocument.json
- cover_plus.png
- crazy_cat.jpg
- __init__.py
- base.py
- custom_article.py
- dispatcher.py
- github.py
- linkedin.py
- medium.py
- __init__.py
- constants.py
- generation.py
- output_parsers.py
- utils.py
- __init__.py
- base.py
- embeddings.py
- __init__.py
- chunking.py
- cleaning.py
- __init__.py
- chunking_data_handlers.py
- cleaning_data_handlers.py
- dispatchers.py
- embedding_data_handlers.py
- __init__.py
- base.py
- prompt_templates.py
- query_expanison.py
- reranking.py
- retriever.py
- self_query.py
- __init__.py
- misc.py
- split_user_full_name.py
- __init__.py
- __init__.py
- nosql.py
- vector.py
- __init__.py
- chunks.py
- cleaned_documents.py
- dataset.py
- documents.py
- embedded_chunks.py
- exceptions.py
- inference.py
- prompt.py
- queries.py
- types.py
- __init__.py
- config.py
- run.py
- sagemaker_huggingface.py
- __init__.py
- autoscaling_sagemaker_endpoint.py
- delete_sagemaker_endpoint.py
- create_execution_role.py
- create_sagemaker_role.py
- __init__.py
- mongo.py
- qdrant.py
- __init__.py
- files_io.py
- inference_pipeline_api.py
- opik_utils.py
- __init__.py
- evaluate.py
- requirements.txt
- sagemaker.py
- __init__.py
- finetune.py
- requirements.txt
- sagemaker.py
- __init__.py
- inference.py
- run.py
- test.py
- __init__.py
- Readme.md
- utils.py
- __init__.py
- settings.py
- __init__.py
- digital_data_etl.py
- end_to_end_data.py
- evaluating.py
- export_artifact_to_json.py
- feature_engineering.py
- generate_datasets.py
- training.py
- __init__.py
- crawl_links.py
- get_or_create_user.py
- __init__.py
- evaluate.py
- __init__.py
- serialize_artifact.py
- to_json.py
- __init__.py
- clean.py
- load_to_vector_db.py
- query_data_warehouse.py
- rag.py
- __init__.py
- create_prompts.py
- generate_intruction_dataset.py
- generate_preference_dataset.py
- push_to_huggingface.py
- query_feature_store.py
- __init__.py
- train.py
- __init__.py
- __init__.py
- integration_example_test.py
- __init__.py
- unit_example_test.py
- __init__.py
- __init__.py
- data_warehouse.py
- ml_service.py
- rag.py
- run.py
- .env.example
- .gitignore
- .pre-commit-config.yaml
- .python-version
- docker-compose.yml
- Dockerfile
- LICENSE
- poetry.lock
- pyproject.toml
- README.md
- ruff.toml
# 설치 가이드
python설치 및 실행 절차
git clone https://github.com/PacktPublishing/LLM-Engineers-Handbook.git && cd LLM-Engineers-Handbook
저장소를 클론하고 프로젝트 폴더로 이동합니다.
cp .env.example .env
환경 변수 설정 파일을 생성합니다.
poetry env use 3.11
파이썬 3.11 환경을 포에버로 설정합니다.
poetry install --without aws
AWS 종속성을 제외한 프로젝트 패키지를 설치합니다.
poetry run pre-commit install
코드 검증을 위한 pre-commit 훅을 설정합니다.
poetry shell
포에버 가상환경을 활성화합니다.
핵심 명령어
poetry install --without aws
프로젝트의 Python 패키지 의존성을 설치합니다.
poetry run pre-commit install
코드 품질 검증을 위한 pre-commit을 설치합니다.
poetry shell
프로젝트의 가상환경 셸을 실행합니다.
poetry poe local-infrastructure-up
로컬 개발용 인프라(Docker)를 실행합니다.
# CDN으로 사용하기
jsDelivrjsDelivr는 공개 GitHub 리포지토리를 별도 설정 없이 CDN으로 즉시 서빙합니다. 버전과 파일을 고르면 웹페이지에 바로 붙일 수 있는 링크와 예시 코드가 만들어집니다.
명령어 용어집
이 문서에서 사용된 명령어를 모아봤습니다. 낯선 명령어가 있다면 펼쳐서 확인해보세요.
username
설명 보기 ▼
username
사용자를 관리.
설정 모드에서 사용.
더 많은 정보: <https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/security/s1/sec-s1-xe-3se-3850-cr-book/sec-s1-xe-3se-3850-cr-book_chapter_0110.html>.
username {{admin}} privilege 15 secret {{password}}
관리자 계정 생성:
git clone
설명 보기 ▼
git clone
Clone an existing repository.
git clone {{remote_repository_location}} {{path/to/directory}}
Clone an existing repository into a new directory (the default directory is the repository name):
git clone --recursive {{remote_repository_location}}
Clone an existing repository and its submodules:
git clone {{[-n|--no-checkout]}} {{remote_repository_location}}
Clone only the `.git` directory of an existing repository:
poetry install
설명 보기 ▼
poetry install
Install all dependencies for a Python project as defined in the pyproject.toml file.
poetry install
Install dependencies:
poetry install --no-root
Skip installing the project itself as a dependency:
poetry install --without dev
Install only production dependencies:
poetry run
설명 보기 ▼
poetry run
Run a command in the project's virtual environment.
poetry run {{command}}
Run a command inside the virtual environment:
poetry run {{command}} {{argument1 argument2 ...}}
Run a command with arguments:
poetry run {{script_name}}
Run a script defined in `pyproject.toml`:
poetry shell
설명 보기 ▼
poetry shell
Spawn a shell within the virtual environment.
Note: The `shell` command was moved to a plugin: `poetry-plugin-shell`.
poetry shell
Spawn a shell within the virtual environment:
poetry
설명 보기 ▼
poetry
Python 패키지 및 의존성을 관리.
관련 항목: `asdf`, `pipenv`, `hatch`.
더 많은 정보: <https://python-poetry.org/docs/cli/>.
poetry new {{project_name}}
특정 이름으로 디렉토리에 새 Poetry 프로젝트 생성:
poetry add {{dependency}}
현재 디렉토리의 `pyproject.toml` 파일에 의존성과 그 하위 의존성 설치 및 추가:
poetry install
현재 디렉토리의 `pyproject.toml` 파일을 사용하여 프로젝트 의존성 설치:
pyenv
설명 보기 ▼
pyenv
여러 버전의 Python 사이를 쉽게 전환.
관련 항목: `asdf`.
더 많은 정보: <https://manned.org/pyenv>.
pyenv commands
사용 가능한 모든 명령 나열:
pyenv versions
`${PYENV_ROOT}/versions` 디렉토리 아래의 모든 Python 버전 나열:
pyenv install --list
업스트림에서 설치할 수 있는 모든 Python 버전 나열:
python
설명 보기 ▼
python
Python 언어 인터프리터.
더 많은 정보: <https://docs.python.org/using/cmdline.html>.
python
REPL(대화형 셸) 시작:
python {{path/to/file.py}}
특정 Python 파일 실행:
python -i {{path/to/file.py}}
특정 Python 파일 실행 후 REPL 시작:
links
설명 보기 ▼
links
Command-line text-only web browser.
See also: `links2`.
links {{https://example.com}}
Visit a website:
links -anonymous {{https://example.com}}
Apply restrictions for anonymous account:
links -enable-cookies {{0|1}} {{https://example.com}}
Enable Cookies (`1` to enable):
