Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
aymeric-roucher committed Jul 5, 2024
2 parents e563a66 + 5bcdc04 commit 6b6a2d9
Show file tree
Hide file tree
Showing 18 changed files with 11,995 additions and 566 deletions.
144 changes: 85 additions & 59 deletions notebooks/en/_toctree.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,92 @@

- title: Open-Source AI Cookbook
isExpanded: True
sections:
- local: index
title: Open-Source AI Cookbook

- title: LLM Recipes
sections:
- local: automatic_embedding_tei_inference_endpoints
title: Automatic Embeddings with TEI through Inference Endpoints
- local: tgi_messages_api_demo
title: Migrating from OpenAI to Open LLMs Using TGI's Messages API
- local: advanced_rag
title: Advanced RAG on HuggingFace documentation using LangChain
- local: labelling_feedback_setfit
title: Suggestions for Data Annotation with SetFit in Zero-shot Text Classification
- local: fine_tuning_code_llm_on_single_gpu
title: Fine-tuning a Code LLM on Custom Code on a single GPU
- local: prompt_tuning_peft
title: Prompt tuning with PEFT
- local: rag_evaluation
title: RAG Evaluation
- local: llm_judge
title: Using LLM-as-a-judge for an automated and versatile evaluation
- local: index
title: Overview

- title: Diffusion Recipes
sections:
- local: stable_diffusion_interpolation
title: Stable Diffusion Interpolation
- title: LLM Recipes
isExpanded: false
sections:
- local: automatic_embedding_tei_inference_endpoints
title: Automatic Embeddings with TEI through Inference Endpoints
- local: tgi_messages_api_demo
title: Migrating from OpenAI to Open LLMs Using TGI's Messages API
- local: advanced_rag
title: Advanced RAG on HuggingFace documentation using LangChain
- local: labelling_feedback_setfit
title: Suggestions for Data Annotation with SetFit in Zero-shot Text Classification
- local: fine_tuning_code_llm_on_single_gpu
title: Fine-tuning a Code LLM on Custom Code on a single GPU
- local: prompt_tuning_peft
title: Prompt tuning with PEFT
- local: rag_evaluation
title: RAG Evaluation
- local: llm_judge
title: Using LLM-as-a-judge for an automated and versatile evaluation
- local: issues_in_text_dataset
title: Detecting Issues in a Text Dataset with Cleanlab
- local: annotate_text_data_transformers_via_active_learning
title: Annotate text data using Active Learning with Cleanlab
- local: rag_with_hugging_face_gemma_elasticsearch
title: Building a RAG System with Gemma, Elasticsearch and Open Source Models
- local: rag_with_hugging_face_gemma_mongodb
title: Building A RAG System with Gemma, MongoDB and Open Source Models
- local: rag_zephyr_langchain
title: Simple RAG using Hugging Face Zephyr and LangChain
- local: rag_llamaindex_librarian
title: RAG "Librarian" Using LlamaIndex
- local: pipeline_notus_instructions_preferences_legal
title: Create a legal preference dataset
- local: semantic_cache_chroma_vector_database
title: Implementing semantic cache to improve a RAG system.
- local: structured_generation
title: RAG with source highlighting using Structured generation
- local: rag_with_unstructured_data
title: Building RAG with Custom Unstructured Data
- local: fine_tuning_llm_to_generate_persian_product_catalogs_in_json_format
title: Fine-tuning LLM to Generate Persian Product Catalogs in JSON Format
- local: llm_gateway_pii_detection
title: LLM Gateway for PII Detection

- title: Computer Vision Recipes
isExpanded: false
sections:
- local: fine_tuning_vit_custom_dataset
title: Fine-tuning a Vision Transformer Model With a Custom Biomedical Dataset

- title: Multimodal Recipes
sections:
- local: analyzing_art_with_hf_and_fiftyone
title: Analyzing Artistic Styles with Multimodal Embeddings
- local: faiss_with_hf_datasets_and_clip
title: Embedding multimodal data for similarity search

- title: LLM and RAG recipes with other Libraries
sections:
- local: issues_in_text_dataset
title: Detecting Issues in a Text Dataset with Cleanlab
- local: annotate_text_data_transformers_via_active_learning
title: Annotate text data using Active Learning with Cleanlab
- local: rag_with_hugging_face_gemma_mongodb
title: Building A RAG System with Gemma, MongoDB and Open Source Models
- local: rag_zephyr_langchain
title: Simple RAG using Hugging Face Zephyr and LangChain
- local: rag_llamaindex_librarian
title: RAG "Librarian" Using LlamaIndex
- local: pipeline_notus_instructions_preferences_legal
title: Create a legal preference dataset
- local: semantic_cache_chroma_vector_database
title: Implementing semantic cache to improve a RAG system.
- local: structured_generation
title: RAG with source highlighting using Structured generation
- title: Diffusion Recipes
isExpanded: false
sections:
- local: stable_diffusion_interpolation
title: Stable Diffusion Interpolation

- title: Computer Vision
sections:
- local: fine_tuning_vit_custom_dataset
title: Fine-tuning a Vision Transformer Model With a Custom Biomedical Dataset
- title: Multimodal Recipes
isExpanded: false
sections:
- local: analyzing_art_with_hf_and_fiftyone
title: Analyzing Artistic Styles with Multimodal Embeddings
- local: faiss_with_hf_datasets_and_clip
title: Embedding multimodal data for similarity search

- title: Agents Recipes
isExpanded: false
sections:
- local: agents
title: Build an agent with tool-calling superpowers using Transformers Agents
- local: agent_rag
title: Agentic RAG - turbocharge your RAG with query reformulation and self-query

- title: Agents
- title: Enterprise Hub Cookbook
isExpanded: True
sections:
- local: agents
title: Build an agent with tool-calling superpowers using Transformers Agents
- local: agent_rag
title: Agentic RAG - turbocharge your RAG with query reformulation and self-query
- local: enterprise_cookbook_overview
title: Overview
- local: enterprise_cookbook_dev_spaces
title: Interactive Development In HF Spaces
- local: enterprise_hub_serverless_inference_api
title: Inference API (Serverless)
- local: enterprise_dedicated_endpoints
title: Inference Endpoints (Dedicated)
- local: enterprise_cookbook_argilla
title: Data annotation with Argilla Spaces
2 changes: 1 addition & 1 deletion notebooks/en/advanced_rag.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"outputs": [],
"source": [
"!pip install -q torch transformers transformers accelerate bitsandbytes langchain sentence-transformers faiss-gpu openpyxl pacmap"
"!pip install -q torch transformers transformers accelerate bitsandbytes langchain sentence-transformers faiss-gpu openpyxl pacmap datasets langchain-community ragatouille"
]
},
{
Expand Down
42 changes: 30 additions & 12 deletions notebooks/en/automatic_embedding_tei_inference_endpoints.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,36 @@
"id": "1e680f3d-4900-46cc-8b49-bb6ba3e27e2b",
"metadata": {},
"source": [
"Hugging Face offers a number of GPUs that you can choose from a number of GPUs that you can choose in Inference Endpoints. Here they are in table form:\n",
"Inference Endpoints offers a number of GPUs that you can choose from. Check the [documentation](https://huggingface.co/docs/inference-endpoints/en/pricing#gpu-instances) for GPU and alternative accelerators for information.\n",
"\n",
"| GPU | instanceType | instanceSize | vRAM |\n",
"|---------------------|----------------|--------------|-------|\n",
"| 1x Nvidia Tesla T4 | g4dn.xlarge | small | 16GB |\n",
"| 4x Nvidia Tesla T4 | g4dn.12xlarge | large | 64GB |\n",
"| 1x Nvidia A10G | g5.2xlarge | medium | 24GB |\n",
"| 4x Nvidia A10G | g5.12xlarge | xxlarge | 96GB |\n",
"| 1x Nvidia A100* | p4de | xlarge | 80GB |\n",
"| 2x Nvidia A100* | p4de | 2xlarge | 160GB |\n",
"> [!TIP]\n",
"> You may need to email us for access to some architectures.\n",
"\n",
"\\*Note that for A100s you might get a note to email us to get access."
"| Provider | Instance Type | Instance Size | Hourly rate | GPUs | Memory | Architecture |\n",
"|:--------:|:-------------:|:-------------:|:-----------:|:----:|:------:|:---------------:|\n",
"| aws | nvidia-a10g | x1 | $1 | 1 | 24GB | NVIDIA A10G |\n",
"| aws | nvidia-t4 | x1 | $0.5 | 1 | 14GB | NVIDIA T4 |\n",
"| aws | nvidia-t4 | x4 | $3 | 4 | 56GB | NVIDIA T4 |\n",
"| gcp | nvidia-l4 | x1 | $0.8 | 1 | 24GB | NVIDIA L4 |\n",
"| gcp | nvidia-l4 | x4 | $3.8 | 4 | 96GB | NVIDIA L4 |\n",
"| aws | nvidia-a100 | x1 | $4 | 1 | 80GB | NVIDIA A100 |\n",
"| aws | nvidia-a10g | x4 | $5 | 4 | 96GB | NVIDIA A10G |\n",
"| aws | nvidia-a100 | x2 | $8 | 2 | 160GB | NVIDIA A100 |\n",
"| aws | nvidia-a100 | x4 | $16 | 4 | 320GB | NVIDIA A100 |\n",
"| aws | nvidia-a100 | x8 | $32 | 8 | 640GB | NVIDIA A100 |\n",
"| gcp | nvidia-t4 | x1 | $0.5 | 1 | 16GB | NVIDIA T4 |\n",
"| gcp | nvidia-l4 | x1 | $1 | 1 | 24GB | NVIDIA L4 |\n",
"| gcp | nvidia-l4 | x4 | $5 | 4 | 96GB | NVIDIA L4 |\n",
"| gcp | nvidia-a100 | x1 | $6 | 1 | 80 GB | NVIDIA A100 |\n",
"| gcp | nvidia-a100 | x2 | $12 | 2 | 160 GB | NVIDIA A100 |\n",
"| gcp | nvidia-a100 | x4 | $24 | 4 | 320 GB | NVIDIA A100 |\n",
"| gcp | nvidia-a100 | x8 | $48 | 8 | 640 GB | NVIDIA A100 |\n",
"| gcp | nvidia-h100 | x1 | $12.5 | 1 | 80 GB | NVIDIA H100 |\n",
"| gcp | nvidia-h100 | x2 | $25 | 2 | 160 GB | NVIDIA H100 |\n",
"| gcp | nvidia-h100 | x4 | $50 | 4 | 320 GB | NVIDIA H100 |\n",
"| gcp | nvidia-h100 | x8 | $100 | 8 | 640 GB | NVIDIA H100 |\n",
"| aws | inf2 | x1 | $0.75 | 1 | 32GB | AWS Inferentia2 |\n",
"| aws | inf2 | x12 | $12 | 12 | 384GB | AWS Inferentia2 |"
]
},
{
Expand All @@ -139,8 +157,8 @@
"# GPU Choice\n",
"VENDOR=\"aws\"\n",
"REGION=\"us-east-1\"\n",
"INSTANCE_SIZE=\"medium\"\n",
"INSTANCE_TYPE=\"g5.2xlarge\""
"INSTANCE_SIZE=\"x1\"\n",
"INSTANCE_TYPE=\"nvidia-a10g\""
]
},
{
Expand Down
Loading

0 comments on commit 6b6a2d9

Please sign in to comment.