text
stringlengths
3
1.68M
id
stringlengths
13
169
metadata
dict
__index_level_0__
int64
0
2.21k
# Copyright 2020 The HuggingFace Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
datasets/metrics/xnli/xnli.py/0
{ "file_path": "datasets/metrics/xnli/xnli.py", "repo_id": "datasets", "token_count": 1107 }
136
python_tests()
llama_index/llama-index-integrations/readers/llama-index-readers-jira/tests/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-jira/tests/BUILD", "repo_id": "llama_index", "token_count": 5 }
1,386
# Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_prior.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_prior.py", "repo_id": "diffusers", "token_count": 10627 }
269
# coding=utf-8 # Copyright 2020 The HuggingFace Team All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
transformers/examples/research_projects/mlm_wwm/run_mlm_wwm.py/0
{ "file_path": "transformers/examples/research_projects/mlm_wwm/run_mlm_wwm.py", "repo_id": "transformers", "token_count": 7241 }
567
from llama_index.finetuning.gradient import GradientFinetuneEngine from llama_index.finetuning.types import BaseLLMFinetuneEngine def test_class(): names_of_base_classes = [b.__name__ for b in GradientFinetuneEngine.__mro__] assert BaseLLMFinetuneEngine.__name__ in names_of_base_classes
llama_index/llama-index-finetuning/tests/gradient/test_gradient_classes.py/0
{ "file_path": "llama_index/llama-index-finetuning/tests/gradient/test_gradient_classes.py", "repo_id": "llama_index", "token_count": 103 }
1,256
# Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
accelerate/examples/inference/gpt2.py/0
{ "file_path": "accelerate/examples/inference/gpt2.py", "repo_id": "accelerate", "token_count": 760 }
10
from langchain_community.document_loaders.couchbase import CouchbaseLoader __all__ = ["CouchbaseLoader"]
langchain/libs/langchain/langchain/document_loaders/couchbase.py/0
{ "file_path": "langchain/libs/langchain/langchain/document_loaders/couchbase.py", "repo_id": "langchain", "token_count": 31 }
478
import { buildPrompt } from "$lib/buildPrompt"; import { textGenerationStream } from "@huggingface/inference"; import { z } from "zod"; import type { Endpoint } from "../endpoints"; export const endpointAwsParametersSchema = z.object({ weight: z.number().int().positive().default(1), model: z.any(), type: z.literal(...
chat-ui/src/lib/server/endpoints/aws/endpointAws.ts/0
{ "file_path": "chat-ui/src/lib/server/endpoints/aws/endpointAws.ts", "repo_id": "chat-ui", "token_count": 558 }
96
from nvidia_rag_canonical.chain import chain, ingest __all__ = ["chain", "ingest"]
langchain/templates/nvidia-rag-canonical/nvidia_rag_canonical/__init__.py/0
{ "file_path": "langchain/templates/nvidia-rag-canonical/nvidia_rag_canonical/__init__.py", "repo_id": "langchain", "token_count": 28 }
717
"""Palm API.""" import os from typing import Any, Callable, Optional, Sequence import google.generativeai as palm from llama_index.core.base.llms.types import ( ChatMessage, CompletionResponse, CompletionResponseGen, LLMMetadata, ) from llama_index.core.bridge.pydantic import Field, PrivateAttr from ll...
llama_index/llama-index-integrations/llms/llama-index-llms-palm/llama_index/llms/palm/base.py/0
{ "file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-palm/llama_index/llms/palm/base.py", "repo_id": "llama_index", "token_count": 1886 }
1,241
# coding=utf-8 # Copyright 2022 SenseTime and The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2....
transformers/src/transformers/models/deformable_detr/configuration_deformable_detr.py/0
{ "file_path": "transformers/src/transformers/models/deformable_detr/configuration_deformable_detr.py", "repo_id": "transformers", "token_count": 5659 }
588
import logging from abc import ABC, abstractmethod from typing import Any, Callable, Optional, Sequence from llama_index.core.base.llms.types import ChatMessage from llama_index.core.llms.generic_utils import ( prompt_to_messages, ) from llama_index.llms.anthropic.utils import messages_to_anthropic_prompt from lla...
llama_index/llama-index-integrations/llms/llama-index-llms-bedrock/llama_index/llms/bedrock/utils.py/0
{ "file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-bedrock/llama_index/llms/bedrock/utils.py", "repo_id": "llama_index", "token_count": 2507 }
1,291
## 5. Proxy <img src="./figs/proxy.png" width=700> #### 5.0 Proxy Service Interface ```go type ProxyService interface { Component TimeTickProvider RegisterNode(ctx context.Context, request *proxypb.RegisterNodeRequest) (*proxypb.RegisterNodeResponse, error) InvalidateCollectionMetaCache(ctx context.Context, req...
milvus/docs/developer_guides/chap05_proxy.md/0
{ "file_path": "milvus/docs/developer_guides/chap05_proxy.md", "repo_id": "milvus", "token_count": 5920 }
1,738
# Let's train and play with Huggy 🐶 [[train]] <CourseFloatingBanner classNames="absolute z-10 right-0 top-0" notebooks={[ {label: "Google Colab", value: "https://colab.research.google.com/github/huggingface/deep-rl-class/blob/master/notebooks/bonus-unit1/bonus-unit1.ipynb"} ...
deep-rl-class/units/en/unitbonus1/train.mdx/0
{ "file_path": "deep-rl-class/units/en/unitbonus1/train.mdx", "repo_id": "deep-rl-class", "token_count": 4009 }
165
"""Init file.""" from llama_index.readers.apify.dataset.base import ApifyDataset __all__ = ["ApifyDataset"]
llama_index/llama-index-integrations/readers/llama-index-readers-apify/llama_index/readers/apify/dataset/__init__.py/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-apify/llama_index/readers/apify/dataset/__init__.py", "repo_id": "llama_index", "token_count": 44 }
1,262
#![allow(clippy::excessive_precision)] // Code taken from https://github.com/statrs-dev/statrs //! Provides the [error](https://en.wikipedia.org/wiki/Error_function) and //! related functions mod evaluate { //! Provides functions that don't have a numerical solution and must //! be solved computationally (e.g....
candle/candle-core/src/cpu/erf.rs/0
{ "file_path": "candle/candle-core/src/cpu/erf.rs", "repo_id": "candle", "token_count": 11974 }
34
try: from pydantic.v1.dataclasses import * # noqa: F403 except ImportError: from pydantic.dataclasses import * # noqa: F403
langchain/libs/core/langchain_core/pydantic_v1/dataclasses.py/0
{ "file_path": "langchain/libs/core/langchain_core/pydantic_v1/dataclasses.py", "repo_id": "langchain", "token_count": 53 }
421
<jupyter_start><jupyter_text>CSV>A [comma-separated values (CSV)](https://en.wikipedia.org/wiki/Comma-separated_values) file is a delimited text file that uses a comma to separate values. Each line of the file is a data record. Each record consists of one or more fields, separated by commas.Load [csv](https://en.wikipe...
langchain/docs/docs/integrations/document_loaders/csv.ipynb/0
{ "file_path": "langchain/docs/docs/integrations/document_loaders/csv.ipynb", "repo_id": "langchain", "token_count": 2450 }
100
import os from pathlib import Path from typing import List, Dict, Optional, Tuple from safetensors import safe_open, SafetensorError import torch from loguru import logger from huggingface_hub import hf_hub_download import json from text_generation_server.utils.log import log_once class Weights: def __init__( ...
text-generation-inference/server/text_generation_server/utils/weights.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/utils/weights.py", "repo_id": "text-generation-inference", "token_count": 9541 }
435
# LlamaIndex Tools Integration: Ionic Shopping [Ionic](https://ioniccommerce.com) is a plug and play ecommerce marketplace for AI Assistants. By including the Ionic Tool in your agent, you are effortlessly providing your users with the ability to shop and transact directly within your agent, and you’ll get a cut of th...
llama_index/llama-index-integrations/tools/llama-index-tools-ionic-shopping/README.md/0
{ "file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-ionic-shopping/README.md", "repo_id": "llama_index", "token_count": 489 }
1,621
<!--Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/ja/model_doc/auto.md/0
{ "file_path": "transformers/docs/source/ja/model_doc/auto.md", "repo_id": "transformers", "token_count": 3268 }
480
import datetime import logging import time from utils.util_log import test_log as logger from utils.utils import gen_collection_name import pytest from api.milvus import CollectionClient from base.testbase import TestBase import threading @pytest.mark.L0 class TestCreateCollection(TestBase): @pytest.mark.paramet...
milvus/tests/restful_client/testcases/test_collection_operations.py/0
{ "file_path": "milvus/tests/restful_client/testcases/test_collection_operations.py", "repo_id": "milvus", "token_count": 6276 }
2,046
Data Connectors =============== NOTE: Our data connectors are now offered through `LlamaHub <https://llamahub.ai/>`_ 🦙. LlamaHub is an open-source repository containing data loaders that you can easily plug and play into any LlamaIndex application. The following data connectors are still available in the core repo. ...
llama_index/docs/api_reference/readers.rst/0
{ "file_path": "llama_index/docs/api_reference/readers.rst", "repo_id": "llama_index", "token_count": 113 }
1,096
from llama_index.core.readers.base import BaseReader from llama_index.readers.arango_db import SimpleArangoDBReader def test_class(): names_of_base_classes = [b.__name__ for b in SimpleArangoDBReader.__mro__] assert BaseReader.__name__ in names_of_base_classes
llama_index/llama-index-integrations/readers/llama-index-readers-arango-db/tests/test_readers_arango_db.py/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-arango-db/tests/test_readers_arango_db.py", "repo_id": "llama_index", "token_count": 94 }
1,320
[build-system] build-backend = "poetry.core.masonry.api" requires = ["poetry-core"] [tool.codespell] check-filenames = true check-hidden = true skip = "*.csv,*.html,*.json,*.jsonl,*.pdf,*.txt,*.ipynb" [tool.llamahub] classes = ["LiteLLM"] contains_example = false import_path = "llama_index.llms.litellm" [tool.mypy] ...
llama_index/llama-index-integrations/llms/llama-index-llms-litellm/pyproject.toml/0
{ "file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-litellm/pyproject.toml", "repo_id": "llama_index", "token_count": 651 }
1,301
search_performance: collections: - server: db_config.primary_path: /test/milvus/db_data_gpu/sift_50m_1024_128_l2_sq8 cache_config.cpu_cache_capacity: 32 engine_config.use_blas_threshold: 1100 engine_config.gpu_search_threshold: 1 gpu_resource_config.enable: false ...
milvus/tests/benchmark/milvus_benchmark/suites/cpu_search_performance_sift50m.yaml/0
{ "file_path": "milvus/tests/benchmark/milvus_benchmark/suites/cpu_search_performance_sift50m.yaml", "repo_id": "milvus", "token_count": 338 }
1,974
#!/usr/bin/env python # coding=utf-8 # Copyright 2021 The HuggingFace Team All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
transformers/examples/pytorch/question-answering/run_seq2seq_qa.py/0
{ "file_path": "transformers/examples/pytorch/question-answering/run_seq2seq_qa.py", "repo_id": "transformers", "token_count": 13528 }
551
<!--Copyright 2022 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
accelerate/docs/source/usage_guides/big_modeling.md/0
{ "file_path": "accelerate/docs/source/usage_guides/big_modeling.md", "repo_id": "accelerate", "token_count": 1765 }
4
"use client"; import { ChatWindow } from "../app/components/ChatWindow"; import { ToastContainer } from "react-toastify"; import { ChakraProvider } from "@chakra-ui/react"; export default function Home() { return ( <ChakraProvider> <ToastContainer /> <ChatWindow apiBaseUrl={ proce...
weblangchain/nextjs/app/page.tsx/0
{ "file_path": "weblangchain/nextjs/app/page.tsx", "repo_id": "weblangchain", "token_count": 217 }
2,065
"""Util that calls Outline.""" import logging from typing import Any, Dict, List, Optional import requests from langchain_core.documents import Document from langchain_core.pydantic_v1 import BaseModel, root_validator from langchain_core.utils import get_from_dict_or_env logger = logging.getLogger(__name__) OUTLINE_...
langchain/libs/community/langchain_community/utilities/outline.py/0
{ "file_path": "langchain/libs/community/langchain_community/utilities/outline.py", "repo_id": "langchain", "token_count": 1449 }
302
from llama_index.vector_stores.timescalevector.base import TimescaleVectorStore __all__ = ["TimescaleVectorStore"]
llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-timescalevector/llama_index/vector_stores/timescalevector/__init__.py/0
{ "file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-timescalevector/llama_index/vector_stores/timescalevector/__init__.py", "repo_id": "llama_index", "token_count": 33 }
1,543
from dataclasses import dataclass from typing import List, Optional, Union import numpy as np import PIL.Image from ...utils import ( BaseOutput, ) @dataclass class StableDiffusionSafePipelineOutput(BaseOutput): """ Output class for Safe Stable Diffusion pipelines. Args: images (`List[PIL.I...
diffusers/src/diffusers/pipelines/stable_diffusion_safe/pipeline_output.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_safe/pipeline_output.py", "repo_id": "diffusers", "token_count": 527 }
252
import json import os from typing import Any, List, Literal from llama_index.vector_stores.docarray.base import DocArrayVectorStore class DocArrayHnswVectorStore(DocArrayVectorStore): """Class representing a DocArray HNSW vector store. This class is a lightweight Document Index implementation provided by Do...
llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-docarray/llama_index/vector_stores/docarray/hnsw.py/0
{ "file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-docarray/llama_index/vector_stores/docarray/hnsw.py", "repo_id": "llama_index", "token_count": 1958 }
1,554
import { test, expect } from "@jest/globals"; import { LLMResult } from "@langchain/core/outputs"; import { StringPromptValue } from "@langchain/core/prompt_values"; import { CallbackManager } from "@langchain/core/callbacks/manager"; import { NewTokenIndices } from "@langchain/core/callbacks/base"; import { ClientSecr...
langchainjs/libs/langchain-azure-openai/src/tests/llms.int.test.ts/0
{ "file_path": "langchainjs/libs/langchain-azure-openai/src/tests/llms.int.test.ts", "repo_id": "langchainjs", "token_count": 3267 }
944
<jupyter_start><jupyter_text>Google Vertex AI Vector SearchThis notebook shows how to use functionality related to the `Google Cloud Vertex AI Vector Search` vector database.> [Google Vertex AI Vector Search](https://cloud.google.com/vertex-ai/docs/matching-engine/overview), formerly known as Vertex AI Matching Engine,...
langchain/docs/docs/integrations/vectorstores/google_vertex_ai_vector_search.ipynb/0
{ "file_path": "langchain/docs/docs/integrations/vectorstores/google_vertex_ai_vector_search.ipynb", "repo_id": "langchain", "token_count": 1961 }
188
# Installation Before you start, you'll need to setup your environment and install the appropriate packages. 🤗 Datasets is tested on **Python 3.7+**. <Tip> If you want to use 🤗 Datasets with TensorFlow or PyTorch, you'll need to install them separately. Refer to the [TensorFlow installation page](https://www.tenso...
datasets/docs/source/installation.md/0
{ "file_path": "datasets/docs/source/installation.md", "repo_id": "datasets", "token_count": 1236 }
123
from unittest.mock import Mock from llama_index.core.base.base_query_engine import BaseQueryEngine from llama_index.core.base.llms.types import ChatMessage, MessageRole from llama_index.core.base.response.schema import Response from llama_index.core.chat_engine.condense_question import ( CondenseQuestionChatEngine...
llama_index/llama-index-core/tests/chat_engine/test_condense_question.py/0
{ "file_path": "llama_index/llama-index-core/tests/chat_engine/test_condense_question.py", "repo_id": "llama_index", "token_count": 735 }
1,148
python_sources() python_tests( name="tests", dependencies=["llama-index-core/tests/indices/query/query_transform/__init__.py", "llama-index-core/tests/indices/query/query_transform:query_transform"] )
llama_index/llama-index-core/tests/indices/query/query_transform/BUILD/0
{ "file_path": "llama_index/llama-index-core/tests/indices/query/query_transform/BUILD", "repo_id": "llama_index", "token_count": 76 }
1,313
# Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
trl/tests/slow/test_sft_slow.py/0
{ "file_path": "trl/tests/slow/test_sft_slow.py", "repo_id": "trl", "token_count": 7186 }
812
import { SqlDatabase } from "langchain/sql_db"; import { DataSource } from "typeorm"; const datasource = new DataSource({ type: "sqlite", database: "../../../../Chinook.db", }); export const db = await SqlDatabase.fromDataSourceParams({ appDataSource: datasource, });
langchainjs/examples/src/use_cases/sql/db.ts/0
{ "file_path": "langchainjs/examples/src/use_cases/sql/db.ts", "repo_id": "langchainjs", "token_count": 89 }
821
<jupyter_start><jupyter_text>Run TemplateIn `server.py`, set -```add_routes(app, chain_rag_conv, path="/rag-gemini-multi-modal")```<jupyter_code>from langserve.client import RemoteRunnable rag_app = RemoteRunnable("http://localhost:8001/rag-gemini-multi-modal") rag_app.invoke("What is the projected TAM for observabili...
langchain/templates/rag-gemini-multi-modal/rag_gemini_multi_modal.ipynb/0
{ "file_path": "langchain/templates/rag-gemini-multi-modal/rag_gemini_multi_modal.ipynb", "repo_id": "langchain", "token_count": 138 }
715
[package] name = "worker" version = "0.1.0" edition = "2021" [[bin]] name = "worker" path = "src/bin/worker.rs" [dependencies] tonic = "0.10" prost = "0.12" prost-types = "0.12" tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } tokio-util = "0.7.10" rand = "0.8.5" rayon = "1.8.0" async-trait = "0....
chroma/rust/worker/Cargo.toml/0
{ "file_path": "chroma/rust/worker/Cargo.toml", "repo_id": "chroma", "token_count": 504 }
59
"""Load html from files, clean up, split, ingest into Weaviate.""" import logging import os import re from parser import langchain_docs_extractor import weaviate from bs4 import BeautifulSoup, SoupStrainer from langchain.document_loaders import RecursiveUrlLoader, SitemapLoader from langchain.indexes import SQLRecordM...
chat-langchain/ingest.py/0
{ "file_path": "chat-langchain/ingest.py", "repo_id": "chat-langchain", "token_count": 2295 }
8
// Copyright (C) 2019-2020 Zilliz. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable l...
milvus/internal/core/unittest/test_scalar_index_creator.cpp/0
{ "file_path": "milvus/internal/core/unittest/test_scalar_index_creator.cpp", "repo_id": "milvus", "token_count": 2159 }
1,905
import { expect, test } from "@jest/globals"; import chroma from "./initClient"; import { IDS, EMBEDDINGS } from "./data"; test("it should peek a collection", async () => { await chroma.reset(); const collection = await chroma.createCollection({ name: "test" }); await collection.add({ ids: IDS, embeddings: EMBED...
chroma/clients/js/test/peek.collection.test.ts/0
{ "file_path": "chroma/clients/js/test/peek.collection.test.ts", "repo_id": "chroma", "token_count": 190 }
32
python_sources()
llama_index/llama-index-integrations/llms/llama-index-llms-llama-api/llama_index/llms/llama_api/BUILD/0
{ "file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-llama-api/llama_index/llms/llama_api/BUILD", "repo_id": "llama_index", "token_count": 6 }
1,302
<jupyter_start><jupyter_text>ClientDemo of a client interacting with a custom runnable executor that supports configuration.This server does not support invoke or batch! only stream and astream log! (see backend code.)The underlying backend code is just a demo in this case -- it's working around an existing bug, but us...
langserve/examples/configurable_agent_executor/client.ipynb/0
{ "file_path": "langserve/examples/configurable_agent_executor/client.ipynb", "repo_id": "langserve", "token_count": 1308 }
1,081
// Licensed to the LF AI & Data foundation under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use th...
milvus/internal/rootcoord/undo_test.go/0
{ "file_path": "milvus/internal/rootcoord/undo_test.go", "repo_id": "milvus", "token_count": 1455 }
1,886
# https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-23-11.html#rel-23-11 FROM nvcr.io/nvidia/pytorch:23.11-py3 LABEL maintainer="Hugging Face" ARG DEBIAN_FRONTEND=noninteractive # Example: `cu102`, `cu113`, etc. ARG CUDA='cu121' RUN apt -y update RUN apt install -y libaio-dev RUN python3 -m p...
transformers/docker/transformers-pytorch-deepspeed-nightly-gpu/Dockerfile/0
{ "file_path": "transformers/docker/transformers-pytorch-deepspeed-nightly-gpu/Dockerfile", "repo_id": "transformers", "token_count": 1028 }
490
simple_chaos: collections: - milvus: null before: - interface_name: create_collection params: data_type: local dimension: 128 - interface_name: insert params: batch_size: 5000 collection_size: 100...
milvus/tests/benchmark/milvus_benchmark/suites/flush_kill_query_pod.yaml/0
{ "file_path": "milvus/tests/benchmark/milvus_benchmark/suites/flush_kill_query_pod.yaml", "repo_id": "milvus", "token_count": 627 }
2,152
export type ChatWindowMessage = { content: string; role: "human" | "ai"; runId?: string; traceUrl?: string; }
langsmith-cookbook/feedback-examples/nextjs/schema/ChatWindowMessage.ts/0
{ "file_path": "langsmith-cookbook/feedback-examples/nextjs/schema/ChatWindowMessage.ts", "repo_id": "langsmith-cookbook", "token_count": 41 }
1,137
from llama_index.readers.slack.base import SlackReader __all__ = ["SlackReader"]
llama_index/llama-index-integrations/readers/llama-index-readers-slack/llama_index/readers/slack/__init__.py/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-slack/llama_index/readers/slack/__init__.py", "repo_id": "llama_index", "token_count": 28 }
1,380
<jupyter_start><jupyter_text>Exploring simple optimizations for Stable Diffusion XL<jupyter_code>!nvidia-smi !pip install git+https://github.com/huggingface/diffusers -q !pip install transformers accelerate -q<jupyter_output><empty_output><jupyter_text>Unoptimized setup* FP32 computation* Default attention processor<ju...
notebooks/diffusers/exploring_simple optimizations_for_sdxl.ipynb/0
{ "file_path": "notebooks/diffusers/exploring_simple optimizations_for_sdxl.ipynb", "repo_id": "notebooks", "token_count": 3443 }
276
// Licensed to the LF AI & Data foundation under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use th...
milvus/internal/rootcoord/scheduler_test.go/0
{ "file_path": "milvus/internal/rootcoord/scheduler_test.go", "repo_id": "milvus", "token_count": 2388 }
1,856
<jupyter_start><jupyter_text>Tout assembler (PyTorch) Installez la bibliothèque 🤗 *Transformers* pour exécuter ce *notebook*.<jupyter_code>!pip install transformers[sentencepiece] from transformers import AutoTokenizer checkpoint = "tblard/tf-allocine" tokenizer = AutoTokenizer.from_pretrained(checkpoint) sequence =...
notebooks/course/fr/chapter2/section6_pt.ipynb/0
{ "file_path": "notebooks/course/fr/chapter2/section6_pt.ipynb", "repo_id": "notebooks", "token_count": 974 }
307
# Ollama Query Engine Pack Create a query engine using completely local by Ollama ## CLI Usage You can download llamapacks directly using `llamaindex-cli`, which comes installed with the `llama-index` python package: ```bash llamaindex-cli download-llamapack OllamaQueryEnginePack --download-dir ./ollama_pack ``` Y...
llama_index/llama-index-packs/llama-index-packs-ollama-query-engine/README.md/0
{ "file_path": "llama_index/llama-index-packs/llama-index-packs-ollama-query-engine/README.md", "repo_id": "llama_index", "token_count": 431 }
1,714
import re import tempfile from pathlib import Path import pytest import yaml from datasets.utils.readme import ReadMe # @pytest.fixture # def example_yaml_structure(): example_yaml_structure = yaml.safe_load( """\ name: "" allow_empty: false allow_empty_text: true subsections: - name: "Dataset Card for X" #...
datasets/tests/test_readme_util.py/0
{ "file_path": "datasets/tests/test_readme_util.py", "repo_id": "datasets", "token_count": 6733 }
156
import { SignatureV4 } from "@smithy/signature-v4"; import { HttpRequest } from "@smithy/protocol-http"; import { EventStreamCodec } from "@smithy/eventstream-codec"; import { fromUtf8, toUtf8 } from "@smithy/util-utf8"; import { Sha256 } from "@aws-crypto/sha256-js"; import { getEnvironmentVariable } from "@langchai...
langchainjs/libs/langchain-community/src/llms/bedrock/web.ts/0
{ "file_path": "langchainjs/libs/langchain-community/src/llms/bedrock/web.ts", "repo_id": "langchainjs", "token_count": 4329 }
1,000
// Copyright (C) 2019-2020 Zilliz. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable l...
milvus/internal/core/src/segcore/IndexConfigGenerator.h/0
{ "file_path": "milvus/internal/core/src/segcore/IndexConfigGenerator.h", "repo_id": "milvus", "token_count": 813 }
1,934
import time import copy import logging from milvus_benchmark import parser from milvus_benchmark.runners import utils from milvus_benchmark.runners.base import BaseRunner logger = logging.getLogger("milvus_benchmark.runners.build") class BuildRunner(BaseRunner): """run build""" name = "build_performance" ...
milvus/tests/benchmark/milvus_benchmark/runners/build.py/0
{ "file_path": "milvus/tests/benchmark/milvus_benchmark/runners/build.py", "repo_id": "milvus", "token_count": 1859 }
2,135
// Licensed to the LF AI & Data foundation under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use th...
milvus/internal/datanode/importv2/util.go/0
{ "file_path": "milvus/internal/datanode/importv2/util.go", "repo_id": "milvus", "token_count": 2967 }
1,921
from typing import cast from llama_index.core.readers.loading import load_reader from llama_index.core.readers.string_iterable import StringIterableReader def test_loading_readers() -> None: string_iterable = StringIterableReader() string_iterable_dict = string_iterable.to_dict() loaded_string_iterable...
llama_index/llama-index-core/tests/readers/test_load_reader.py/0
{ "file_path": "llama_index/llama-index-core/tests/readers/test_load_reader.py", "repo_id": "llama_index", "token_count": 157 }
1,275
# coding=utf-8 # Copyright 2022, Google and The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
transformers/src/transformers/models/pegasus_x/configuration_pegasus_x.py/0
{ "file_path": "transformers/src/transformers/models/pegasus_x/configuration_pegasus_x.py", "repo_id": "transformers", "token_count": 3272 }
677
"""Test embedding integrations."""
langchain/libs/community/tests/integration_tests/embeddings/__init__.py/0
{ "file_path": "langchain/libs/community/tests/integration_tests/embeddings/__init__.py", "repo_id": "langchain", "token_count": 9 }
329
# PDF > [Portable Document Format (PDF)](https://en.wikipedia.org/wiki/PDF), standardized as ISO 32000, is a file format developed by Adobe in 1992 to present documents, including text formatting and images, in a manner independent of application software, hardware, and operating systems. This covers how to load `PDF...
langchainjs/docs/core_docs/docs/modules/data_connection/document_loaders/pdf.mdx/0
{ "file_path": "langchainjs/docs/core_docs/docs/modules/data_connection/document_loaders/pdf.mdx", "repo_id": "langchainjs", "token_count": 835 }
754
use crate::arc_rwlock_serde; use serde::{Deserialize, Serialize}; extern crate tokenizers as tk; use napi::bindgen_prelude::*; use napi_derive::napi; use std::sync::{Arc, RwLock}; use tk::decoders::DecoderWrapper; /// Decoder #[derive(Clone, Serialize, Deserialize)] #[napi] pub struct Decoder { #[serde(flatten, wi...
tokenizers/bindings/node/src/decoders.rs/0
{ "file_path": "tokenizers/bindings/node/src/decoders.rs", "repo_id": "tokenizers", "token_count": 1821 }
457
# coding=utf-8 # Copyright 2020 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
transformers/tests/models/xlm/test_tokenization_xlm.py/0
{ "file_path": "transformers/tests/models/xlm/test_tokenization_xlm.py", "repo_id": "transformers", "token_count": 1506 }
826
<jupyter_start><jupyter_text>AINetwork>[AI Network](https://www.ainetwork.ai/build-on-ain) is a layer 1 blockchain designed to accommodate large-scale AI models, utilizing a decentralized GPU network powered by the [$AIN token](https://www.ainetwork.ai/token), enriching AI-driven `NFTs` (`AINFTs`).>>The `AINetwork Tool...
langchain/docs/docs/integrations/toolkits/ainetwork.ipynb/0
{ "file_path": "langchain/docs/docs/integrations/toolkits/ainetwork.ipynb", "repo_id": "langchain", "token_count": 3970 }
167
from llama_index.packs.rag_evaluator.base import RagEvaluatorPack __all__ = ["RagEvaluatorPack"]
llama_index/llama-index-packs/llama-index-packs-rag-evaluator/llama_index/packs/rag_evaluator/__init__.py/0
{ "file_path": "llama_index/llama-index-packs/llama-index-packs-rag-evaluator/llama_index/packs/rag_evaluator/__init__.py", "repo_id": "llama_index", "token_count": 38 }
1,689
{ "model_type": "roberta" }
transformers/tests/fixtures/dummy-config.json/0
{ "file_path": "transformers/tests/fixtures/dummy-config.json", "repo_id": "transformers", "token_count": 15 }
698
import { unstable_dev } from "wrangler"; import type { UnstableDevWorker } from "wrangler"; import { describe, expect, it, beforeAll, afterAll } from "vitest"; describe("Worker", () => { let worker: UnstableDevWorker; beforeAll(async () => { worker = await unstable_dev("src/index.ts", { experimental: { ...
langchainjs/environment_tests/test-exports-cf/src/index.int.test.ts/0
{ "file_path": "langchainjs/environment_tests/test-exports-cf/src/index.int.test.ts", "repo_id": "langchainjs", "token_count": 243 }
782
build_performance: collections: - server: db_config.primary_path: /test/milvus/db_data_011/sift_50m_128_l2_pq cache_config.cpu_cache_capacity: 8GB engine_config.use_blas_threshold: 1100 engine_config.gpu_search_threshold: 1 gpu_resource_config.enable: true gpu...
milvus/tests/benchmark/milvus_benchmark/suites/011_gpu_build_sift50m.yaml/0
{ "file_path": "milvus/tests/benchmark/milvus_benchmark/suites/011_gpu_build_sift50m.yaml", "repo_id": "milvus", "token_count": 1259 }
1,874
package notification import ( "context" "reflect" "testing" "github.com/chroma/chroma-coordinator/internal/model" ) func TestMemoryNotificationStore_GetAllPendingNotifications(t *testing.T) { // Create a new MemoryNotificationStore store := NewMemoryNotificationStore() // Create some test notifications noti...
chroma/go/coordinator/internal/notification/memory_notification_store_test.go/0
{ "file_path": "chroma/go/coordinator/internal/notification/memory_notification_store_test.go", "repo_id": "chroma", "token_count": 1494 }
50
<jupyter_start><jupyter_text>Chat Bot Evaluation as Multi-agent SimulationWhen building a chat bot, such as a customer support assistant, it can be hard to properly evalute your bot's performance. It's time-consuming to have to manually interact with it intensively for each code change.One way to make the evaluation pr...
langgraph/examples/chatbot-simulation-evaluation/agent-simulation-evaluation.ipynb/0
{ "file_path": "langgraph/examples/chatbot-simulation-evaluation/agent-simulation-evaluation.ipynb", "repo_id": "langgraph", "token_count": 2572 }
1,029
import { Index } from "@upstash/vector"; import { OpenAIEmbeddings } from "@langchain/openai"; import { UpstashVectorStore } from "@langchain/community/vectorstores/upstash"; const index = new Index({ url: process.env.UPSTASH_VECTOR_REST_URL as string, token: process.env.UPSTASH_VECTOR_REST_TOKEN as string, }); c...
langchainjs/examples/src/indexes/vector_stores/upstash/delete_docs.ts/0
{ "file_path": "langchainjs/examples/src/indexes/vector_stores/upstash/delete_docs.ts", "repo_id": "langchainjs", "token_count": 341 }
854
export * from "./base.js"; export * from "./conditional.js"; export * from "./length_based.js"; export * from "./semantic_similarity.js";
langchainjs/langchain-core/src/example_selectors/index.ts/0
{ "file_path": "langchainjs/langchain-core/src/example_selectors/index.ts", "repo_id": "langchainjs", "token_count": 47 }
861
<!--Copyright 2022 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/ko/quicktour.md/0
{ "file_path": "transformers/docs/source/ko/quicktour.md", "repo_id": "transformers", "token_count": 17505 }
561
import { CohereEmbeddings } from "@langchain/cohere"; import { HNSWLib } from "@langchain/community/vectorstores/hnswlib"; import { PromptTemplate } from "@langchain/core/prompts"; import { StringOutputParser } from "@langchain/core/output_parsers"; import { RunnablePassthrough, RunnableSequence, } from "@langchain...
langchainjs/examples/src/guides/expression_language/runnable_maps_sequence.ts/0
{ "file_path": "langchainjs/examples/src/guides/expression_language/runnable_maps_sequence.ts", "repo_id": "langchainjs", "token_count": 389 }
842
import os # Temporary handling of environment variables for testing os.environ["REDIS_URL"] = "redis://localhost:6379/3" os.environ["OPENAI_API_KEY"] = "test" os.environ["YDC_API_KEY"] = "test" os.environ["TAVILY_API_KEY"] = "test"
opengpts/backend/tests/unit_tests/conftest.py/0
{ "file_path": "opengpts/backend/tests/unit_tests/conftest.py", "repo_id": "opengpts", "token_count": 89 }
2,138
# coding=utf-8 # Copyright 2022 Meta Platforms, Inc.and The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/...
transformers/src/transformers/models/mask2former/configuration_mask2former.py/0
{ "file_path": "transformers/src/transformers/models/mask2former/configuration_mask2former.py", "repo_id": "transformers", "token_count": 4898 }
628
<!--Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/en/model_doc/led.md/0
{ "file_path": "transformers/docs/source/en/model_doc/led.md", "repo_id": "transformers", "token_count": 1602 }
464
from langchain_community.embeddings.baidu_qianfan_endpoint import ( QianfanEmbeddingsEndpoint, ) __all__ = ["QianfanEmbeddingsEndpoint"]
langchain/libs/langchain/langchain/embeddings/baidu_qianfan_endpoint.py/0
{ "file_path": "langchain/libs/langchain/langchain/embeddings/baidu_qianfan_endpoint.py", "repo_id": "langchain", "token_count": 53 }
522
import { test } from "@jest/globals"; import { ChatOpenAI } from "@langchain/openai"; import { createOpenAPIChain } from "../openapi.js"; test("OpenAPI chain with a provided full spec", async () => { const chain = await createOpenAPIChain( { openapi: "3.0.1", info: { version: "v0", title: "Open AI K...
langchainjs/langchain/src/chains/openai_functions/tests/openapi.int.test.ts/0
{ "file_path": "langchainjs/langchain/src/chains/openai_functions/tests/openapi.int.test.ts", "repo_id": "langchainjs", "token_count": 2737 }
863
from typing import Optional, Union, Sequence, Dict, Mapping, List from typing_extensions import Literal, TypedDict, TypeVar from uuid import UUID from enum import Enum Metadata = Mapping[str, Union[str, int, float, bool]] UpdateMetadata = Mapping[str, Union[int, float, str, bool, None]] # Namespaced Names are mecha...
chroma/chromadb/types.py/0
{ "file_path": "chroma/chromadb/types.py", "repo_id": "chroma", "token_count": 1643 }
27
# coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
transformers/src/transformers/hyperparameter_search.py/0
{ "file_path": "transformers/src/transformers/hyperparameter_search.py", "repo_id": "transformers", "token_count": 1646 }
597
import { loadEvaluator } from "langchain/evaluation"; import { FakeEmbeddings } from "@langchain/core/utils/testing"; const chain = await loadEvaluator("embedding_distance"); const res = await chain.evaluateStrings({ prediction: "I shall go", reference: "I shan't go", }); console.log({ res }); /* { res: { score...
langchainjs/examples/src/guides/evaluation/string/embedding_distance.ts/0
{ "file_path": "langchainjs/examples/src/guides/evaluation/string/embedding_distance.ts", "repo_id": "langchainjs", "token_count": 478 }
806
"""Test SQL Database Chain.""" from langchain_community.llms.openai import OpenAI from langchain_community.utilities.sql_database import SQLDatabase from sqlalchemy import Column, Integer, MetaData, String, Table, create_engine, insert from langchain_experimental.sql.base import ( SQLDatabaseChain, SQLDatabase...
langchain/libs/experimental/tests/integration_tests/chains/test_sql_database.py/0
{ "file_path": "langchain/libs/experimental/tests/integration_tests/chains/test_sql_database.py", "repo_id": "langchain", "token_count": 1236 }
428
from langchain_core.vectorstores import VectorStore from langchain import vectorstores def test_all_imports() -> None: """Simple test to make sure all things can be imported.""" for cls in vectorstores.__all__: if cls not in [ "AlibabaCloudOpenSearchSettings", "ClickhouseSetti...
langchain/libs/langchain/tests/unit_tests/vectorstores/test_imports.py/0
{ "file_path": "langchain/libs/langchain/tests/unit_tests/vectorstores/test_imports.py", "repo_id": "langchain", "token_count": 172 }
657
# XML Loader This loader extracts the text from a local XML file. A single local file is passed in each time you call `load_data`. ## Usage To use this loader, you need to pass in a `Path` to a local file. ```python from pathlib import Path from llama_index import download_loader XMLReader = download_loader("XMLRe...
llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/xml/README.md/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/xml/README.md", "repo_id": "llama_index", "token_count": 233 }
1,297
import type { BaseLanguageModelInterface } from "@langchain/core/language_models/base"; import type { VectorStoreInterface } from "@langchain/core/vectorstores"; import { ToolInterface } from "@langchain/core/tools"; import { Toolkit } from "@langchain/community/agents/toolkits/base"; import { VectorStoreQATool } from ...
langchainjs/langchain/src/agents/toolkits/vectorstore/vectorstore.ts/0
{ "file_path": "langchainjs/langchain/src/agents/toolkits/vectorstore/vectorstore.ts", "repo_id": "langchainjs", "token_count": 1509 }
874
{ "name": "", "short_name": "", "icons": [ { "src": "/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" }, { "src": "/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" } ], "theme...
auto-evaluator/nextjs/public/favicon/site.webmanifest/0
{ "file_path": "auto-evaluator/nextjs/public/favicon/site.webmanifest", "repo_id": "auto-evaluator", "token_count": 222 }
4
[build-system] build-backend = "poetry.core.masonry.api" requires = ["poetry-core"] [tool.codespell] check-filenames = true check-hidden = true skip = "*.csv,*.html,*.json,*.jsonl,*.pdf,*.txt,*.ipynb" [tool.llamahub] classes = ["GitHubIssuesClient", "GitHubRepositoryCollaboratorsReader", "GitHubRepositoryIssuesReader...
llama_index/llama-index-integrations/readers/llama-index-readers-github/pyproject.toml/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-github/pyproject.toml", "repo_id": "llama_index", "token_count": 752 }
1,305
import { Client, ClientOptions } from "@elastic/elasticsearch"; import { OpenAI, OpenAIEmbeddings } from "@langchain/openai"; import { VectorDBQAChain } from "langchain/chains"; import { ElasticClientArgs, ElasticVectorSearch, } from "@langchain/community/vectorstores/elasticsearch"; import { Document } from "@lan...
langchainjs/examples/src/indexes/vector_stores/elasticsearch/elasticsearch.ts/0
{ "file_path": "langchainjs/examples/src/indexes/vector_stores/elasticsearch/elasticsearch.ts", "repo_id": "langchainjs", "token_count": 1159 }
813
import unittest import pytest from langchain_community.document_loaders.parsers.language.csharp import CSharpSegmenter @pytest.mark.requires("tree_sitter", "tree_sitter_languages") class TestCSharpSegmenter(unittest.TestCase): def setUp(self) -> None: self.example_code = """namespace World { } class He...
langchain/libs/community/tests/unit_tests/document_loaders/parsers/language/test_csharp.py/0
{ "file_path": "langchain/libs/community/tests/unit_tests/document_loaders/parsers/language/test_csharp.py", "repo_id": "langchain", "token_count": 861 }
396
// eslint-disable-next-line import/no-extraneous-dependencies import validateProjectName from "validate-npm-package-name"; export function validateNpmName(name: string): { valid: boolean; problems?: string[]; } { const nameValidation = validateProjectName(name); if (nameValidation.validForNewPackages) { re...
langchainjs/libs/create-langchain-integration/helpers/validate-pkg.ts/0
{ "file_path": "langchainjs/libs/create-langchain-integration/helpers/validate-pkg.ts", "repo_id": "langchainjs", "token_count": 171 }
927
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
transformers/src/transformers/models/roformer/convert_roformer_original_tf_checkpoint_to_pytorch.py/0
{ "file_path": "transformers/src/transformers/models/roformer/convert_roformer_original_tf_checkpoint_to_pytorch.py", "repo_id": "transformers", "token_count": 776 }
715
# coding=utf-8 # Copyright 2022 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
transformers/tests/models/mobilenet_v2/test_image_processing_mobilenet_v2.py/0
{ "file_path": "transformers/tests/models/mobilenet_v2/test_image_processing_mobilenet_v2.py", "repo_id": "transformers", "token_count": 1544 }
813
from __future__ import annotations from typing import Sequence from langchain_core.language_models import BaseLanguageModel from langchain_core.prompts import BasePromptTemplate from langchain_core.runnables import Runnable, RunnablePassthrough from langchain_core.tools import BaseTool from langchain.agents.format_s...
langchain/libs/langchain/langchain/agents/react/agent.py/0
{ "file_path": "langchain/libs/langchain/langchain/agents/react/agent.py", "repo_id": "langchain", "token_count": 1563 }
489
# Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
peft/src/peft/tuners/adalora/model.py/0
{ "file_path": "peft/src/peft/tuners/adalora/model.py", "repo_id": "peft", "token_count": 7189 }
323
# PPO Trainer TRL supports the [PPO](https://arxiv.org/abs/1707.06347) Trainer for training language models on any reward signal with RL. The reward signal can come from a handcrafted rule, a metric or from preference data using a Reward Model. For a full example have a look at [`examples/notebooks/gpt2-sentiment.ipyn...
trl/docs/source/ppo_trainer.mdx/0
{ "file_path": "trl/docs/source/ppo_trainer.mdx", "repo_id": "trl", "token_count": 2114 }
878