Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
3
1.68M
id
stringlengths
13
169
metadata
dict
__index_level_0__
int64
0
2.21k
"""In memory store that is not thread safe and has no eviction policy. This is a simple implementation of the BaseStore using a dictionary that is useful primarily for unit testing purposes. """ from typing import ( Any, AsyncIterator, Dict, Generic, Iterator, List, Optional, Sequence, ...
langchain/libs/langchain/langchain/storage/in_memory.py/0
{ "file_path": "langchain/libs/langchain/langchain/storage/in_memory.py", "repo_id": "langchain", "token_count": 1942 }
543
--- sidebar_class_name: node-only --- # Llama CPP :::tip Compatibility Only available on Node.js. ::: This module is based on the [node-llama-cpp](https://github.com/withcatai/node-llama-cpp) Node.js bindings for [llama.cpp](https://github.com/ggerganov/llama.cpp), allowing you to work with a locally running LLM. Th...
langchainjs/docs/core_docs/docs/integrations/text_embedding/llama_cpp.mdx/0
{ "file_path": "langchainjs/docs/core_docs/docs/integrations/text_embedding/llama_cpp.mdx", "repo_id": "langchainjs", "token_count": 649 }
743
python_test_utils( name="test_utils", ) python_tests( name="tests", ) python_sources()
llama_index/llama-index-core/tests/indices/tree/BUILD/0
{ "file_path": "llama_index/llama-index-core/tests/indices/tree/BUILD", "repo_id": "llama_index", "token_count": 42 }
1,159
from llama_index.packs.gradio_react_agent_chatbot.base import GradioReActAgentPack __all__ = ["GradioReActAgentPack"]
llama_index/llama-index-packs/llama-index-packs-gradio-react-agent-chatbot/llama_index/packs/gradio_react_agent_chatbot/__init__.py/0
{ "file_path": "llama_index/llama-index-packs/llama-index-packs-gradio-react-agent-chatbot/llama_index/packs/gradio_react_agent_chatbot/__init__.py", "repo_id": "llama_index", "token_count": 41 }
1,673
import base64 import json import logging import subprocess import textwrap import time from typing import Any, Dict, List, Mapping, Optional import requests from langchain_core.callbacks import CallbackManagerForLLMRun from langchain_core.language_models.llms import LLM from langchain_core.pydantic_v1 import Extra, Fi...
langchain/libs/community/langchain_community/llms/beam.py/0
{ "file_path": "langchain/libs/community/langchain_community/llms/beam.py", "repo_id": "langchain", "token_count": 4328 }
275
<!--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-2.0 Unless required by applicable law or agreed...
transformers/docs/source/zh/debugging.md/0
{ "file_path": "transformers/docs/source/zh/debugging.md", "repo_id": "transformers", "token_count": 7278 }
561
# coding=utf-8 # Copyright 2024 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...
diffusers/tests/pipelines/stable_diffusion_2/test_stable_diffusion_depth.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion_2/test_stable_diffusion_depth.py", "repo_id": "diffusers", "token_count": 11024 }
283
"""Video audio parser. Contains parsers for mp3, mp4 files. """ from pathlib import Path from typing import Any, Dict, List, Optional, cast from llama_index.core.readers.base import BaseReader from llama_index.core.schema import Document class VideoAudioReader(BaseReader): """Video audio parser. Extract t...
llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/video_audio/base.py/0
{ "file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/video_audio/base.py", "repo_id": "llama_index", "token_count": 806 }
1,371
<jupyter_start><jupyter_text>Custom String Evaluator[](https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/docs/guides/evaluation/string/custom.ipynb)You can make your own custom string evaluators by inheriting from the `StringEvaluator` class and implementing the `_evaluate_strings` (and `...
langchain/docs/docs/guides/evaluation/string/custom.ipynb/0
{ "file_path": "langchain/docs/docs/guides/evaluation/string/custom.ipynb", "repo_id": "langchain", "token_count": 676 }
86
from llama_index.core.llama_pack import BaseLlamaPack from llama_index.packs.agent_search_retriever import AgentSearchRetrieverPack def test_class(): names_of_base_classes = [b.__name__ for b in AgentSearchRetrieverPack.__mro__] assert BaseLlamaPack.__name__ in names_of_base_classes
llama_index/llama-index-packs/llama-index-packs-agent-search-retriever/tests/test_packs_agent_search_retriever.py/0
{ "file_path": "llama_index/llama-index-packs/llama-index-packs-agent-search-retriever/tests/test_packs_agent_search_retriever.py", "repo_id": "llama_index", "token_count": 104 }
1,657
# coding=utf-8 # Copyright 2022 UW-Madison 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/nystromformer/modeling_nystromformer.py/0
{ "file_path": "transformers/src/transformers/models/nystromformer/modeling_nystromformer.py", "repo_id": "transformers", "token_count": 20641 }
671
"""Index registry.""" from typing import Dict, Type from llama_index.legacy.data_structs.struct_type import IndexStructType from llama_index.legacy.indices.base import BaseIndex from llama_index.legacy.indices.document_summary.base import DocumentSummaryIndex from llama_index.legacy.indices.empty.base import EmptyInd...
llama_index/llama-index-legacy/llama_index/legacy/indices/registry.py/0
{ "file_path": "llama_index/llama-index-legacy/llama_index/legacy/indices/registry.py", "repo_id": "llama_index", "token_count": 479 }
1,576
from __future__ import annotations from typing import TYPE_CHECKING, List, Optional from langchain_core.utils import get_from_env if TYPE_CHECKING: from elasticsearch import Elasticsearch from elasticsearch.client import MlClient from langchain_core.embeddings import Embeddings class ElasticsearchEmbeddin...
langchain/libs/community/langchain_community/embeddings/elasticsearch.py/0
{ "file_path": "langchain/libs/community/langchain_community/embeddings/elasticsearch.py", "repo_id": "langchain", "token_count": 3606 }
275
[package] name = "text-generation-launcher" description = "Text Generation Launcher" version.workspace = true edition.workspace = true authors.workspace = true homepage.workspace = true [dependencies] clap = { version = "4.4.5", features = ["derive", "env"] } ctrlc = { version = "3.4.1", features = ["termination"] } n...
text-generation-inference/launcher/Cargo.toml/0
{ "file_path": "text-generation-inference/launcher/Cargo.toml", "repo_id": "text-generation-inference", "token_count": 277 }
429
# coding=utf-8 # Copyright 2023 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/quantization/autoawq/test_awq.py/0
{ "file_path": "transformers/tests/quantization/autoawq/test_awq.py", "repo_id": "transformers", "token_count": 7755 }
763
--- hide_table_of_contents: true sidebar_class_name: node-only --- # S3 File :::tip Compatibility Only available on Node.js. ::: This covers how to load document objects from an s3 file object. ## Setup To run this index you'll need to have Unstructured already set up and ready to use at an available URL endpoint....
langchainjs/docs/core_docs/docs/integrations/document_loaders/web_loaders/s3.mdx/0
{ "file_path": "langchainjs/docs/core_docs/docs/integrations/document_loaders/web_loaders/s3.mdx", "repo_id": "langchainjs", "token_count": 324 }
735
# coding=utf-8 # Copyright The HuggingFace Team 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/LICE...
transformers/src/transformers/models/xglm/tokenization_xglm_fast.py/0
{ "file_path": "transformers/src/transformers/models/xglm/tokenization_xglm_fast.py", "repo_id": "transformers", "token_count": 3356 }
719
from llama_index.core.vector_stores.types import VectorStore from llama_index.vector_stores.rocksetdb import RocksetVectorStore def test_class(): names_of_base_classes = [b.__name__ for b in RocksetVectorStore.__mro__] assert VectorStore.__name__ in names_of_base_classes
llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-rocksetdb/tests/test_vector_stores_rocksetdb.py/0
{ "file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-rocksetdb/tests/test_vector_stores_rocksetdb.py", "repo_id": "llama_index", "token_count": 94 }
1,475
import logging from typing import Callable, List, Optional, Sequence from llama_index.core.async_utils import run_async_tasks from llama_index.core.base.base_query_engine import BaseQueryEngine from llama_index.core.base.base_retriever import BaseRetriever from llama_index.core.base.base_selector import BaseSelector f...
llama_index/llama-index-core/llama_index/core/query_engine/router_query_engine.py/0
{ "file_path": "llama_index/llama-index-core/llama_index/core/query_engine/router_query_engine.py", "repo_id": "llama_index", "token_count": 6714 }
1,241
import pytest import torch from copy import copy from transformers import AutoTokenizer from text_generation_server.pb import generate_pb2 from text_generation_server.models.seq2seq_lm import Seq2SeqLM, Seq2SeqLMBatch @pytest.fixture(scope="session") def mt0_small_tokenizer(): tokenizer = AutoTokenizer.from_pr...
text-generation-inference/server/tests/models/test_seq2seq_lm.py/0
{ "file_path": "text-generation-inference/server/tests/models/test_seq2seq_lm.py", "repo_id": "text-generation-inference", "token_count": 5483 }
393
[package] name = "candle-metal-kernels" version = "0.4.0" edition = "2021" description = "Metal kernels for Candle" repository = "https://github.com/huggingface/candle" keywords = ["blas", "tensor", "machine-learning"] categories = ["science"] license = "MIT OR Apache-2.0" [dependencies] metal = { version = "0.27.0"...
candle/candle-metal-kernels/Cargo.toml/0
{ "file_path": "candle/candle-metal-kernels/Cargo.toml", "repo_id": "candle", "token_count": 218 }
54
// 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/has_collection_task.go/0
{ "file_path": "milvus/internal/rootcoord/has_collection_task.go", "repo_id": "milvus", "token_count": 543 }
1,862
# What are the policy-based methods? The main goal of Reinforcement learning is to **find the optimal policy \\(\pi^{*}\\) that will maximize the expected cumulative reward**. Because Reinforcement Learning is based on the *reward hypothesis*: **all goals can be described as the maximization of the expected cumulative...
deep-rl-class/units/en/unit4/what-are-policy-based-methods.mdx/0
{ "file_path": "deep-rl-class/units/en/unit4/what-are-policy-based-methods.mdx", "repo_id": "deep-rl-class", "token_count": 1034 }
180
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
4