text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
# Copyright 2024 Katherine Crowson and 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... | diffusers/src/diffusers/schedulers/scheduling_euler_discrete.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/scheduling_euler_discrete.py",
"repo_id": "diffusers",
"token_count": 10863
} | 258 |
<jupyter_start><jupyter_text>10Q AnalysisIn this demo, we explore answering complex queries by decomposing them into simpler sub-queries. If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.<jupyter_code>%pip install llama-index-llms-openai
!pip install llama-index
import nest_asyn... | llama_index/docs/examples/usecases/10q_sub_question.ipynb/0 | {
"file_path": "llama_index/docs/examples/usecases/10q_sub_question.ipynb",
"repo_id": "llama_index",
"token_count": 1526
} | 1,108 |
[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-musl-gcc"
rustflags = ["-C", "target-feature=-crt-static"]
| tokenizers/bindings/node/.cargo/config.toml/0 | {
"file_path": "tokenizers/bindings/node/.cargo/config.toml",
"repo_id": "tokenizers",
"token_count": 50
} | 409 |
"""Main entrypoint into package.
This is the ONLY public interface into the package. All other modules are
to be considered private and subject to change without notice.
"""
from langserve.api_handler import APIHandler
from langserve.client import RemoteRunnable
from langserve.schema import CustomUserType
from langse... | langserve/langserve/__init__.py/0 | {
"file_path": "langserve/langserve/__init__.py",
"repo_id": "langserve",
"token_count": 155
} | 999 |
<!--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/en/model_doc/detr.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/detr.md",
"repo_id": "transformers",
"token_count": 4104
} | 506 |
from typing import List, Optional
from langchain.chains.openai_functions import (
create_structured_output_chain,
)
from langchain.schema import Document
from langchain_community.chat_models import ChatOpenAI
from langchain_community.graphs import Neo4jGraph
from langchain_community.graphs.graph_document import Gr... | langchain/templates/neo4j-generation/neo4j_generation/chain.py/0 | {
"file_path": "langchain/templates/neo4j-generation/neo4j_generation/chain.py",
"repo_id": "langchain",
"token_count": 1793
} | 697 |
[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 = ["GradioAgentChatPack"]
contains_example = false
import_path = "llama_index.packs.gradio_ag... | llama_index/llama-index-packs/llama-index-packs-gradio-agent-chat/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-gradio-agent-chat/pyproject.toml",
"repo_id": "llama_index",
"token_count": 672
} | 1,848 |
# coding=utf-8
# Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved.
#
# This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
# and OPT implementations in this library. It has been modified from its
# original forms to accommodate minor architectural differences compared
# to G... | text-generation-inference/server/text_generation_server/models/custom_modeling/flash_neox_modeling.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/models/custom_modeling/flash_neox_modeling.py",
"repo_id": "text-generation-inference",
"token_count": 6181
} | 427 |
# see https://github.com/pytorch/pytorch/blob/main/torch/nn/modules/container.py
from .module import Module
from typing import (
Any,
Dict,
Iterable,
Iterator,
Mapping,
Optional,
overload,
Tuple,
TypeVar,
Union,
)
from collections import OrderedDict, abc as container_abcs
import ... | candle/candle-pyo3/py_src/candle/nn/container.py/0 | {
"file_path": "candle/candle-pyo3/py_src/candle/nn/container.py",
"repo_id": "candle",
"token_count": 7602
} | 62 |
export const TYPES = {
agent: {
id: "agent",
title: "Assistant",
description:
"These GPTs can use an arbitrary number of tools, and you can give them arbitrary instructions. The LLM itself is responsible for deciding which tools to call and how many times to call them. This makes them super powerful... | opengpts/frontend/src/constants.ts/0 | {
"file_path": "opengpts/frontend/src/constants.ts",
"repo_id": "opengpts",
"token_count": 360
} | 2,141 |
<jupyter_start><jupyter_text>Quip>[Quip](https://quip.com) is a collaborative productivity software suite for mobile and Web. It allows groups of people to create and edit documents and spreadsheets as a group, typically for business purposes.A loader for `Quip` docs.Please refer [here](https://quip.com/dev/automation/... | langchain/docs/docs/integrations/document_loaders/quip.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/quip.ipynb",
"repo_id": "langchain",
"token_count": 651
} | 117 |
# coding=utf-8
# Copyright 2023 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/fastspeech2_conformer/convert_hifigan.py/0 | {
"file_path": "transformers/src/transformers/models/fastspeech2_conformer/convert_hifigan.py",
"repo_id": "transformers",
"token_count": 2201
} | 602 |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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 cop... | transformers/src/transformers/data/processors/glue.py/0 | {
"file_path": "transformers/src/transformers/data/processors/glue.py",
"repo_id": "transformers",
"token_count": 10214
} | 552 |
/*
## Cohere
First run Chroma
```
git clone git@github.com:chroma-core/chroma.git
cd chroma
chroma run --path /chroma_db_path
```
Then install chroma and cohere
```
npm install chromadb
npm install cohere-ai
```
Then set your API KEY
### Basic Example
*/
// import chroma
const chroma = require("chromadb");
cons... | chroma/examples/use_with/cohere/cohere_js.js/0 | {
"file_path": "chroma/examples/use_with/cohere/cohere_js.js",
"repo_id": "chroma",
"token_count": 802
} | 40 |
#!/usr/bin/env python3
""" Model Benchmark Script
An inference and train step benchmark script for timm models.
Hacked together by Ross Wightman (https://github.com/rwightman)
"""
import argparse
import csv
import json
import logging
import time
from collections import OrderedDict
from contextlib import suppress
from... | pytorch-image-models/benchmark.py/0 | {
"file_path": "pytorch-image-models/benchmark.py",
"repo_id": "pytorch-image-models",
"token_count": 13272
} | 326 |
from typing import List
from langchain_core.callbacks import CallbackManagerForRetrieverRun
from langchain_core.documents import Document
from langchain_core.retrievers import BaseRetriever
from langchain_community.utilities.arxiv import ArxivAPIWrapper
class ArxivRetriever(BaseRetriever, ArxivAPIWrapper):
"""`... | langchain/libs/community/langchain_community/retrievers/arxiv.py/0 | {
"file_path": "langchain/libs/community/langchain_community/retrievers/arxiv.py",
"repo_id": "langchain",
"token_count": 286
} | 271 |
[tool.poetry]
name = "vertexai-chuck-norris"
version = "0.0.1"
description = "This template makes jokes about Chuck Norris using Vertex AI PaLM2"
authors = []
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
langchain = "^0.1"
google-cloud-aiplatform = "^1.36.4"
[tool.poetry.group.dev.dependenc... | langchain/templates/vertexai-chuck-norris/pyproject.toml/0 | {
"file_path": "langchain/templates/vertexai-chuck-norris/pyproject.toml",
"repo_id": "langchain",
"token_count": 292
} | 715 |
<!--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 required by applicable law or agreed... | transformers/docs/source/ko/tasks/zero_shot_image_classification.md/0 | {
"file_path": "transformers/docs/source/ko/tasks/zero_shot_image_classification.md",
"repo_id": "transformers",
"token_count": 3889
} | 506 |
"""Prompts from evaporate repo.
Full credits go to: https://github.com/HazyResearch/evaporate
"""
from llama_index.legacy.prompts import PromptTemplate
# deprecated, kept for backward compatibility
"""Pandas PromptTemplate. Convert query to python code.
Required template variables: `chunk`, `topic`.
Args:
... | llama_index/llama-index-legacy/llama_index/legacy/program/predefined/evaporate/prompts.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/program/predefined/evaporate/prompts.py",
"repo_id": "llama_index",
"token_count": 1498
} | 1,696 |
<jupyter_start><jupyter_text>Using local modelsThe popularity of projects like [PrivateGPT](https://github.com/imartinez/privateGPT), [llama.cpp](https://github.com/ggerganov/llama.cpp), and [GPT4All](https://github.com/nomic-ai/gpt4all) underscore the importance of running LLMs locally.LangChain has [integrations](htt... | langchain/docs/docs/use_cases/question_answering/local_retrieval_qa.ipynb/0 | {
"file_path": "langchain/docs/docs/use_cases/question_answering/local_retrieval_qa.ipynb",
"repo_id": "langchain",
"token_count": 2532
} | 199 |
<jupyter_start><jupyter_text>HuggingFace dataset>The [Hugging Face Hub](https://huggingface.co/docs/hub/index) is home to over 5,000 [datasets](https://huggingface.co/docs/hub/indexdatasets) in more than 100 languages that can be used for a broad range of tasks across NLP, Computer Vision, and Audio. They used for a di... | langchain/docs/docs/integrations/document_loaders/hugging_face_dataset.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/hugging_face_dataset.ipynb",
"repo_id": "langchain",
"token_count": 416
} | 105 |
import re
from typing import List
from langchain_experimental.data_anonymizer.deanonymizer_mapping import MappingDataType
def exact_matching_strategy(text: str, deanonymizer_mapping: MappingDataType) -> str:
"""
Exact matching strategy for deanonymization.
It replaces all the anonymized entities with the... | langchain/libs/experimental/langchain_experimental/data_anonymizer/deanonymizer_matching_strategies.py/0 | {
"file_path": "langchain/libs/experimental/langchain_experimental/data_anonymizer/deanonymizer_matching_strategies.py",
"repo_id": "langchain",
"token_count": 2761
} | 417 |
from unittest import TestCase
from datasets import Dataset
from minhash_deduplication import deduplicate_dataset, make_duplicate_clusters
def get_dataset():
data_dict = {
"repo_name": ["test_repo1", "test_repo2", "test_repo3"],
"path": ["test_1.py", "test_2.py", "unit_test.py"],
"content"... | transformers/examples/research_projects/codeparrot/scripts/tests/test_deduplicate.py/0 | {
"file_path": "transformers/examples/research_projects/codeparrot/scripts/tests/test_deduplicate.py",
"repo_id": "transformers",
"token_count": 456
} | 538 |
# Copyright 2022 Facebook and 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... | transformers/src/transformers/models/esm/__init__.py/0 | {
"file_path": "transformers/src/transformers/models/esm/__init__.py",
"repo_id": "transformers",
"token_count": 1226
} | 602 |
import contextlib
from multiprocessing import Pool, RLock
from tqdm.auto import tqdm
from ..utils import experimental, logging
logger = logging.get_logger(__name__)
class ParallelBackendConfig:
backend_name = None
@experimental
def parallel_map(function, iterable, num_proc, types, disable_tqdm, desc, single... | datasets/src/datasets/parallel/parallel.py/0 | {
"file_path": "datasets/src/datasets/parallel/parallel.py",
"repo_id": "datasets",
"token_count": 1700
} | 155 |
use std::fs;
fn main() -> Result<(), Box<dyn std::error::Error>> {
println!("cargo:rerun-if-changed=../../proto/generate.proto");
fs::create_dir("src/pb").unwrap_or(());
let mut config = prost_build::Config::new();
config.protoc_arg("--experimental_allow_proto3_optional");
tonic_build::configure(... | text-generation-inference/router/client/build.rs/0 | {
"file_path": "text-generation-inference/router/client/build.rs",
"repo_id": "text-generation-inference",
"token_count": 270
} | 373 |
# Glossary
- `Collection`: Data table containing multiple Segments.
- `Segment`: The memory structure of storing a piece of data which supports concurrent insertion, deletion, query, index loading, monitoring and statistics.
- `Schema`: Definition of collection data format, including
- `vector<FieldMeta>`: Order lis... | milvus/docs/design_docs/segcore/basic_types.md/0 | {
"file_path": "milvus/docs/design_docs/segcore/basic_types.md",
"repo_id": "milvus",
"token_count": 334
} | 1,769 |
python_sources()
| llama_index/llama-index-packs/llama-index-packs-recursive-retriever/llama_index/packs/recursive_retriever/embedded_tables_unstructured/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-recursive-retriever/llama_index/packs/recursive_retriever/embedded_tables_unstructured/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,680 |
# coding=utf-8
# Copyright 2023 HuggingFace Inc. Team and Bigscience Workshop. 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/bloom/modeling_flax_bloom.py/0 | {
"file_path": "transformers/src/transformers/models/bloom/modeling_flax_bloom.py",
"repo_id": "transformers",
"token_count": 12766
} | 629 |
# Chroma Self Query Retriever
This example shows how to use a self query retriever with a Chroma vector store.
## Usage
import IntegrationInstallTooltip from "@mdx_components/integration_install_tooltip.mdx";
<IntegrationInstallTooltip></IntegrationInstallTooltip>
```bash npm2yarn
npm install @langchain/openai @la... | langchainjs/docs/core_docs/docs/modules/data_connection/retrievers/self_query/chroma-self-query.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/modules/data_connection/retrievers/self_query/chroma-self-query.mdx",
"repo_id": "langchainjs",
"token_count": 433
} | 758 |
// 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/storage/insert_data.go/0 | {
"file_path": "milvus/internal/storage/insert_data.go",
"repo_id": "milvus",
"token_count": 7887
} | 1,889 |
python_sources()
| llama_index/llama-index-integrations/extractors/llama-index-extractors-entity/llama_index/extractors/entity/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/extractors/llama-index-extractors-entity/llama_index/extractors/entity/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,378 |
python_tests(
name="tests",
skip_tests=True,
)
| llama_index/llama-index-legacy/tests/memory/BUILD/0 | {
"file_path": "llama_index/llama-index-legacy/tests/memory/BUILD",
"repo_id": "llama_index",
"token_count": 25
} | 1,539 |
/* tslint:disable */
/* eslint-disable */
/* prettier-ignore */
/* auto-generated by NAPI-RS */
const { existsSync, readFileSync } = require('fs')
const { join } = require('path')
const { platform, arch } = process
let nativeBinding = null
let localFileExisted = false
let loadError = null
function isMusl() {
// ... | tokenizers/bindings/node/index.js/0 | {
"file_path": "tokenizers/bindings/node/index.js",
"repo_id": "tokenizers",
"token_count": 4683
} | 393 |
python_sources()
| llama_index/llama-index-legacy/llama_index/legacy/agent/openai/BUILD/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/agent/openai/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,548 |
# coding:utf-8
from typing import List, Optional
from langchain_core.documents import Document
from langchain_community.document_loaders.base import BaseLoader
from langchain_community.document_loaders.obs_file import OBSFileLoader
class OBSDirectoryLoader(BaseLoader):
"""Load from `Huawei OBS directory`."""
... | langchain/libs/community/langchain_community/document_loaders/obs_directory.py/0 | {
"file_path": "langchain/libs/community/langchain_community/document_loaders/obs_directory.py",
"repo_id": "langchain",
"token_count": 1577
} | 254 |
# coding=utf-8
# Copyright 2022 {{cookiecutter.authors}} 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/lice... | transformers/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/configuration_{{cookiecutter.lowercase_modelname}}.py/0 | {
"file_path": "transformers/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/configuration_{{cookiecutter.lowercase_modelname}}.py",
"repo_id": "transformers",
"token_count": 4766
} | 720 |
<jupyter_start><jupyter_text>LLMRailsLet's load the LLMRails Embeddings class.To use LLMRails embedding you need to pass api key by argument or set it in environment with `LLM_RAILS_API_KEY` key.To gey API Key you need to sign up in https://console.llmrails.com/signup and then go to https://console.llmrails.com/api-key... | langchain/docs/docs/integrations/text_embedding/llm_rails.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/text_embedding/llm_rails.ipynb",
"repo_id": "langchain",
"token_count": 295
} | 162 |
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`can initialize createStructuredChatAgent 1`] = `
{
"id": [
"langchain_core",
"runnables",
"RunnableSequence",
],
"kwargs": {
"first": {
"id": [
"langchain_core",
"runnables",
"RunnableAssign",
],
"kwargs... | langchainjs/langchain/src/agents/tests/__snapshots__/create_agent_functions.test.ts.snap/0 | {
"file_path": "langchainjs/langchain/src/agents/tests/__snapshots__/create_agent_functions.test.ts.snap",
"repo_id": "langchainjs",
"token_count": 14419
} | 944 |
<jupyter_start><jupyter_text>LangSmith LLM RunsThis notebook demonstrates how to directly load data from LangSmith's LLM runs and fine-tune a model on that data.The process is simple and comprises 3 steps.1. Select the LLM runs to train on.2. Use the LangSmithRunChatLoader to load runs as chat sessions.3. Fine-tune you... | langchain/docs/docs/integrations/chat_loaders/langsmith_llm_runs.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/chat_loaders/langsmith_llm_runs.ipynb",
"repo_id": "langchain",
"token_count": 2291
} | 94 |
python_sources()
| llama_index/llama-index-core/llama_index/core/memory/BUILD/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/memory/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,276 |
<!---
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 ... | transformers/docs/source/es/pr_checks.md/0 | {
"file_path": "transformers/docs/source/es/pr_checks.md",
"repo_id": "transformers",
"token_count": 2659
} | 515 |
IQ== 0
Ig== 1
Iw== 2
JA== 3
JQ== 4
Jg== 5
Jw== 6
KA== 7
KQ== 8
Kg== 9
Kw== 10
LA== 11
LQ== 12
Lg== 13
Lw== 14
MA== 15
MQ== 16
Mg== 17
Mw== 18
NA== 19
NQ== 20
Ng== 21
Nw== 22
OA== 23
OQ== 24
Og== 25
Ow== 26
PA== 27
PQ== 28
Pg== 29
Pw== 30
QA== 31
QQ== 32
Qg== 33
Qw== 34
RA== 35
RQ== 36
Rg== 37
Rw== 38
SA== 39
SQ== 40
Sg... | llama_index/llama-index-legacy/llama_index/legacy/_static/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/_static/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4",
"repo_id": "llama_index",
"token_count": 1083811
} | 1,543 |
// 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/proxy/task_scheduler_test.go/0 | {
"file_path": "milvus/internal/proxy/task_scheduler_test.go",
"repo_id": "milvus",
"token_count": 6007
} | 1,834 |
package backend
import (
"context"
"fmt"
"path"
"strconv"
"strings"
"github.com/golang/protobuf/proto"
clientv3 "go.etcd.io/etcd/client/v3"
"github.com/milvus-io/milvus/cmd/tools/migration/configs"
"github.com/milvus-io/milvus/cmd/tools/migration/console"
"github.com/milvus-io/milvus/cmd/tools/migration/le... | milvus/cmd/tools/migration/backend/etcd210.go/0 | {
"file_path": "milvus/cmd/tools/migration/backend/etcd210.go",
"repo_id": "milvus",
"token_count": 5592
} | 1,630 |
"""Cassandra-based chat message history, based on cassIO."""
from __future__ import annotations
import json
import typing
from typing import List
if typing.TYPE_CHECKING:
from cassandra.cluster import Session
from langchain_core.chat_history import BaseChatMessageHistory
from langchain_core.messages import (
... | langchain/libs/community/langchain_community/chat_message_histories/cassandra.py/0 | {
"file_path": "langchain/libs/community/langchain_community/chat_message_histories/cassandra.py",
"repo_id": "langchain",
"token_count": 947
} | 231 |
"""**Prompt** is the input to the model.
Prompt is often constructed
from multiple components. Prompt classes and functions make constructing
and working with prompts easy.
**Class hierarchy:**
.. code-block::
BasePromptTemplate --> PipelinePromptTemplate
StringPromptTemplate --> Pro... | langchain/libs/core/langchain_core/prompts/__init__.py/0 | {
"file_path": "langchain/libs/core/langchain_core/prompts/__init__.py",
"repo_id": "langchain",
"token_count": 1136
} | 394 |
// 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/util/importutilv2/numpy/util.go/0 | {
"file_path": "milvus/internal/util/importutilv2/numpy/util.go",
"repo_id": "milvus",
"token_count": 3577
} | 1,902 |
// 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/flow_graph_dmstream_input_node_test.go/0 | {
"file_path": "milvus/internal/datanode/flow_graph_dmstream_input_node_test.go",
"repo_id": "milvus",
"token_count": 1287
} | 1,694 |
<jupyter_start><jupyter_text>Copy PasteThis notebook covers how to load a document object from something you just want to copy and paste. In this case, you don't even need to use a DocumentLoader, but rather can just construct the Document directly.<jupyter_code>from langchain.docstore.document import Document
text = "... | langchain/docs/docs/integrations/document_loaders/copypaste.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/copypaste.ipynb",
"repo_id": "langchain",
"token_count": 196
} | 99 |
{
"git.ignoreLimitWarning": true,
"editor.rulers": [
88
],
"editor.formatOnSave": true,
"python.formatting.provider": "black",
"files.exclude": {
"**/__pycache__": true,
"**/.ipynb_checkpoints": true,
"**/.pytest_cache": true,
"**/chroma.egg-info": true
},
"python.analysis.typeChecki... | chroma/.vscode/settings.json/0 | {
"file_path": "chroma/.vscode/settings.json",
"repo_id": "chroma",
"token_count": 1457
} | 9 |
python_sources()
| llama_index/llama-index-legacy/llama_index/legacy/indices/list/BUILD/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/indices/list/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,497 |
<jupyter_start><jupyter_text>StreamingAll ChatModels implement the Runnable interface, which comes with default implementations of all methods, ie. ainvoke, batch, abatch, stream, astream. This gives all ChatModels basic support for streaming.Streaming support defaults to returning an Iterator (or AsyncIterator in the ... | langchain/docs/docs/modules/model_io/chat/streaming.ipynb/0 | {
"file_path": "langchain/docs/docs/modules/model_io/chat/streaming.ipynb",
"repo_id": "langchain",
"token_count": 445
} | 204 |
# coding=utf-8
# Copyright 2023 The Intel Team Authors, 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/tests/models/tvp/test_modeling_tvp.py/0 | {
"file_path": "transformers/tests/models/tvp/test_modeling_tvp.py",
"repo_id": "transformers",
"token_count": 4545
} | 829 |
<!--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/ko/add_new_model.md/0 | {
"file_path": "transformers/docs/source/ko/add_new_model.md",
"repo_id": "transformers",
"token_count": 43462
} | 503 |
ann_accuracy:
collections:
-
milvus:
cache_config.cpu_cache_capacity: 16GB
engine_config.use_blas_threshold: 1100
server:
cpus: 12
source_file: /test/milvus/ann_hdf5/sift-128-euclidean.hdf5
collection_name: sift_128_euclidean
index_types: ['flat']
index_... | milvus/tests/benchmark/milvus_benchmark/suites/2_accuracy_ann_debug.yaml/0 | {
"file_path": "milvus/tests/benchmark/milvus_benchmark/suites/2_accuracy_ann_debug.yaml",
"repo_id": "milvus",
"token_count": 458
} | 1,867 |
# JAX/Diffusers community sprint
Welcome to the JAX/Diffusers community sprint! The goal of this sprint is to work on fun and creative diffusion models using JAX and Diffusers.
In this event, we will create various applications with diffusion models in JAX/Flax and Diffusers using free TPU hours generously provided b... | diffusion-models-class/units/en/events/4.mdx/0 | {
"file_path": "diffusion-models-class/units/en/events/4.mdx",
"repo_id": "diffusion-models-class",
"token_count": 11592
} | 305 |
# Copyright 2021 AlQuraishi Laboratory
# Copyright 2021 DeepMind Technologies Limited
#
# 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
#
# U... | transformers/src/transformers/models/esm/openfold_utils/protein.py/0 | {
"file_path": "transformers/src/transformers/models/esm/openfold_utils/protein.py",
"repo_id": "transformers",
"token_count": 5075
} | 662 |
# coding=utf-8
# Copyright 2022 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... | text-generation-inference/server/text_generation_server/models/custom_modeling/idefics_image_processing.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/models/custom_modeling/idefics_image_processing.py",
"repo_id": "text-generation-inference",
"token_count": 5687
} | 396 |
# coding=utf-8
# Copyright 2021 The Facebook 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/LI... | transformers/src/transformers/models/speech_to_text_2/tokenization_speech_to_text_2.py/0 | {
"file_path": "transformers/src/transformers/models/speech_to_text_2/tokenization_speech_to_text_2.py",
"repo_id": "transformers",
"token_count": 4350
} | 745 |
python_sources()
| llama_index/llama-index-core/llama_index/core/agent/legacy/react/BUILD/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/agent/legacy/react/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,196 |
import { logVersion010MigrationWarning } from "../util/entrypoint_deprecation.js";
/* #__PURE__ */ logVersion010MigrationWarning({
oldEntrypointName: "embeddings/openai",
newEntrypointName: "",
newPackageName: "@langchain/openai",
});
export {
type OpenAIEmbeddingsParams,
OpenAIEmbeddings,
} from "@langchain... | langchainjs/langchain/src/embeddings/openai.ts/0 | {
"file_path": "langchainjs/langchain/src/embeddings/openai.ts",
"repo_id": "langchainjs",
"token_count": 113
} | 930 |
# Conclusion [[conclusion]]
Congrats on finishing this chapter! There was a lot of information. And congrats on finishing the tutorials. You’ve just implemented your first RL agent from scratch and shared it on the Hub 🥳.
Implementing from scratch when you study a new architecture **is important to understand how it... | deep-rl-class/units/en/unit2/conclusion.mdx/0 | {
"file_path": "deep-rl-class/units/en/unit2/conclusion.mdx",
"repo_id": "deep-rl-class",
"token_count": 337
} | 167 |
<jupyter_start><jupyter_text>LocalAILet's load the LocalAI Embedding class. In order to use the LocalAI Embedding class, you need to have the LocalAI service hosted somewhere and configure the embedding models. See the documentation at https://localai.io/basics/getting_started/index.html and https://localai.io/features... | langchain/docs/docs/integrations/text_embedding/localai.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/text_embedding/localai.ipynb",
"repo_id": "langchain",
"token_count": 471
} | 165 |
# coding=utf-8
# Copyright 2022 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/layoutlmv2/image_processing_layoutlmv2.py/0 | {
"file_path": "transformers/src/transformers/models/layoutlmv2/image_processing_layoutlmv2.py",
"repo_id": "transformers",
"token_count": 5516
} | 633 |
<!--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/en/model_doc/gpt_neox_japanese.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/gpt_neox_japanese.md",
"repo_id": "transformers",
"token_count": 1075
} | 477 |
from langchain.chains.router.base import MultiRouteChain, RouterChain
from langchain.chains.router.llm_router import LLMRouterChain
from langchain.chains.router.multi_prompt import MultiPromptChain
from langchain.chains.router.multi_retrieval_qa import MultiRetrievalQAChain
__all__ = [
"RouterChain",
"MultiRou... | langchain/libs/langchain/langchain/chains/router/__init__.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chains/router/__init__.py",
"repo_id": "langchain",
"token_count": 142
} | 465 |
---
sidebar_class_name: hidden
---
# Custom MRKL agent
This notebook goes through how to create your own custom Modular Reasoning, Knowledge and Language (MRKL, pronounced “miracle”) agent using LCEL.
A MRKL agent consists of three parts:
- Tools: The tools the agent has available to use.
- `Runnable`: The `Runnabl... | langchainjs/docs/core_docs/docs/modules/agents/how_to/custom_mrkl_agent.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/modules/agents/how_to/custom_mrkl_agent.mdx",
"repo_id": "langchainjs",
"token_count": 2796
} | 725 |
python_tests()
| llama_index/llama-index-packs/llama-index-packs-auto-merging-retriever/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-auto-merging-retriever/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,557 |
// 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/ddl_ts_lock_manager.go/0 | {
"file_path": "milvus/internal/rootcoord/ddl_ts_lock_manager.go",
"repo_id": "milvus",
"token_count": 752
} | 2,000 |
<!--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 applicable law or agreed to... | diffusers/docs/source/en/api/pipelines/kandinsky_v22.md/0 | {
"file_path": "diffusers/docs/source/en/api/pipelines/kandinsky_v22.md",
"repo_id": "diffusers",
"token_count": 1050
} | 173 |
from llama_index.core.llama_pack import BaseLlamaPack
from llama_index.packs.vanna import VannaPack
def test_class():
names_of_base_classes = [b.__name__ for b in VannaPack.__mro__]
assert BaseLlamaPack.__name__ in names_of_base_classes
| llama_index/llama-index-packs/llama-index-packs-vanna/tests/test_packs_vanna.py/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-vanna/tests/test_packs_vanna.py",
"repo_id": "llama_index",
"token_count": 93
} | 1,684 |
<!--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 required by applicable law or agreed... | transformers/docs/source/en/model_doc/nougat.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/nougat.md",
"repo_id": "transformers",
"token_count": 1549
} | 461 |
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rule... | langserve/langserve/playground/.eslintrc.cjs/0 | {
"file_path": "langserve/langserve/playground/.eslintrc.cjs",
"repo_id": "langserve",
"token_count": 183
} | 1,045 |
# This file is autogenerated by the command `make fix-copies`, do not edit.
from ..utils import DummyObject, requires_backends
class AltDiffusionImg2ImgPipeline(metaclass=DummyObject):
_backends = ["torch", "transformers"]
def __init__(self, *args, **kwargs):
requires_backends(self, ["torch", "transf... | diffusers/src/diffusers/utils/dummy_torch_and_transformers_objects.py/0 | {
"file_path": "diffusers/src/diffusers/utils/dummy_torch_and_transformers_objects.py",
"repo_id": "diffusers",
"token_count": 18600
} | 255 |
"""
modeled after the textual_inversion.py / train_dreambooth.py and the work
of justinpinkney here: https://github.com/justinpinkney/stable-diffusion/blob/main/notebooks/imagic.ipynb
"""
import inspect
import warnings
from typing import List, Optional, Union
import numpy as np
import PIL.Image
import torch
im... | diffusers/examples/community/imagic_stable_diffusion.py/0 | {
"file_path": "diffusers/examples/community/imagic_stable_diffusion.py",
"repo_id": "diffusers",
"token_count": 10425
} | 197 |
import logging
from typing import Any, Dict, List, Optional, Tuple, Union
import zep_python
from llama_index.core.schema import BaseNode, MetadataMode, TextNode
from llama_index.core.vector_stores.types import (
MetadataFilters,
VectorStore,
VectorStoreQuery,
VectorStoreQueryResult,
)
from llama_index.... | llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-zep/llama_index/vector_stores/zep/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-zep/llama_index/vector_stores/zep/base.py",
"repo_id": "llama_index",
"token_count": 4722
} | 1,683 |
# 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 required by applicabl... | transformers/src/transformers/models/clvp/__init__.py/0 | {
"file_path": "transformers/src/transformers/models/clvp/__init__.py",
"repo_id": "transformers",
"token_count": 974
} | 649 |
<jupyter_start><jupyter_text>Train LLMs using QLoRA on Amazon SageMakerIn this sagemaker example, we are going to learn how to apply [QLoRA: Efficient Finetuning of Quantized LLMs](https://arxiv.org/abs/2305.14314) to fine-tune Falcon 40B. QLoRA is an efficient finetuning technique that quantizes a pretrained language ... | notebooks/sagemaker/28_train_llms_with_qlora/sagemaker-notebook.ipynb/0 | {
"file_path": "notebooks/sagemaker/28_train_llms_with_qlora/sagemaker-notebook.ipynb",
"repo_id": "notebooks",
"token_count": 3913
} | 303 |
python_sources()
python_tests(
name="tests",
skip_tests=True,
)
| llama_index/llama-index-legacy/tests/output_parsers/BUILD/0 | {
"file_path": "llama_index/llama-index-legacy/tests/output_parsers/BUILD",
"repo_id": "llama_index",
"token_count": 32
} | 1,541 |
# Copyright 2020 Optuna, Hugging Face
#
# 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 to in ... | datasets/src/datasets/utils/logging.py/0 | {
"file_path": "datasets/src/datasets/utils/logging.py",
"repo_id": "datasets",
"token_count": 1934
} | 146 |
python_tests()
| llama_index/llama-index-integrations/tools/llama-index-tools-code-interpreter/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-code-interpreter/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,419 |
[tool.poetry]
name = "langchain-google-genai"
version = "0.0.9"
description = "An integration package connecting Google's genai package and LangChain"
authors = []
readme = "README.md"
repository = "https://github.com/langchain-ai/langchain"
license = "MIT"
[tool.poetry.urls]
"Source Code" = "https://github.com/langch... | langchain/libs/partners/google-genai/pyproject.toml/0 | {
"file_path": "langchain/libs/partners/google-genai/pyproject.toml",
"repo_id": "langchain",
"token_count": 1175
} | 665 |
from llama_index.legacy.question_gen.llm_generators import LLMQuestionGenerator
from llama_index.legacy.question_gen.types import SubQuestion
from llama_index.legacy.schema import QueryBundle
from llama_index.legacy.service_context import ServiceContext
from llama_index.legacy.tools.types import ToolMetadata
def test... | llama_index/llama-index-legacy/tests/question_gen/test_llm_generators.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/question_gen/test_llm_generators.py",
"repo_id": "llama_index",
"token_count": 287
} | 1,633 |
## VGG Model Implementation
This example demonstrates the implementation of VGG models (VGG13, VGG16, VGG19) using the Candle library.
The VGG models are defined in `candle-transformers/src/models/vgg.rs`. The main function in `candle-examples/examples/vgg/main.rs` loads an image, selects the VGG model based on the p... | candle/candle-examples/examples/vgg/README.md/0 | {
"file_path": "candle/candle-examples/examples/vgg/README.md",
"repo_id": "candle",
"token_count": 200
} | 48 |
import { test } from "@jest/globals";
import * as fs from "node:fs/promises";
import { fileURLToPath } from "node:url";
import * as path from "node:path";
import { AIMessage, HumanMessage } from "@langchain/core/messages";
import { PromptTemplate } from "@langchain/core/prompts";
import {
BytesOutputParser,
StringO... | langchainjs/libs/langchain-community/src/chat_models/tests/chatollama.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/chat_models/tests/chatollama.int.test.ts",
"repo_id": "langchainjs",
"token_count": 1858
} | 939 |
import * as child_process from "child_process";
import * as path from "path";
import * as util from "util";
import {
getLangChainEnvVars,
getRuntimeEnvironment,
setEnvironmentVariable,
} from "../utils/env.js";
import { Command } from "commander";
import { spawn } from "child_process";
const currentFileName = ... | langsmith-sdk/js/src/cli/main.ts/0 | {
"file_path": "langsmith-sdk/js/src/cli/main.ts",
"repo_id": "langsmith-sdk",
"token_count": 3209
} | 1,101 |
package proxy
import (
"context"
"fmt"
"strconv"
"go.opentelemetry.io/otel"
"go.uber.org/zap"
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus/internal/allocator"
... | milvus/internal/proxy/task_insert.go/0 | {
"file_path": "milvus/internal/proxy/task_insert.go",
"repo_id": "milvus",
"token_count": 3235
} | 1,823 |
# Neo4j Query Engine Pack
This LlamaPack creates a Neo4j query engine, and executes its `query` function. This pack offers the option of creating multiple types of query engines, namely:
- Knowledge graph vector-based entity retrieval (default if no query engine type option is provided)
- Knowledge graph keyword-base... | llama_index/llama-index-packs/llama-index-packs-neo4j-query-engine/README.md/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-neo4j-query-engine/README.md",
"repo_id": "llama_index",
"token_count": 1059
} | 1,668 |
import importlib
import logging
from typing import Any, Callable, List, Optional
from langchain_community.embeddings.self_hosted import SelfHostedEmbeddings
DEFAULT_MODEL_NAME = "sentence-transformers/all-mpnet-base-v2"
DEFAULT_INSTRUCT_MODEL = "hkunlp/instructor-large"
DEFAULT_EMBED_INSTRUCTION = "Represent the docu... | langchain/libs/community/langchain_community/embeddings/self_hosted_hugging_face.py/0 | {
"file_path": "langchain/libs/community/langchain_community/embeddings/self_hosted_hugging_face.py",
"repo_id": "langchain",
"token_count": 2588
} | 255 |
import Exa, {
ContentsOptions,
RegularSearchOptions,
SearchResponse,
SearchResult,
} from "exa-js";
import { BaseRetriever, BaseRetrieverInput } from "@langchain/core/retrievers";
import { Document } from "@langchain/core/documents";
/**
* Interface for the fields required during the initialization of a
* `... | langchainjs/libs/langchain-exa/src/retrievers.ts/0 | {
"file_path": "langchainjs/libs/langchain-exa/src/retrievers.ts",
"repo_id": "langchainjs",
"token_count": 801
} | 1,093 |
"""Prompt template that contains few shot examples."""
from pathlib import Path
from typing import Any, Dict, List, Optional, Union
from langchain_core.prompts.prompt import PromptTemplate
from langchain_core.prompts.string import (
DEFAULT_FORMATTER_MAPPING,
StringPromptTemplate,
)
from langchain_core.pydanti... | langchain/libs/core/langchain_core/prompts/few_shot_with_templates.py/0 | {
"file_path": "langchain/libs/core/langchain_core/prompts/few_shot_with_templates.py",
"repo_id": "langchain",
"token_count": 2376
} | 420 |
""" Dataset Module."""
from llama_index.legacy.llama_dataset.base import (
BaseLlamaDataExample,
BaseLlamaDataset,
BaseLlamaExamplePrediction,
BaseLlamaPredictionDataset,
CreatedBy,
CreatedByType,
)
from llama_index.legacy.llama_dataset.download import download_llama_dataset
from llama_index.le... | llama_index/llama-index-legacy/llama_index/legacy/llama_dataset/__init__.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/llama_dataset/__init__.py",
"repo_id": "llama_index",
"token_count": 768
} | 1,582 |
# High-Level Concepts
This is a quick guide to the high-level concepts you'll encounter frequently when building LLM applications.
```{tip}
If you haven't, [install LlamaIndex](/getting_started/installation.md) and complete the [starter tutorial](/getting_started/starter_example.md) before you read this. It will help... | llama_index/docs/getting_started/concepts.md/0 | {
"file_path": "llama_index/docs/getting_started/concepts.md",
"repo_id": "llama_index",
"token_count": 1585
} | 1,172 |
# 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/amused/test_amused_inpaint.py/0 | {
"file_path": "diffusers/tests/pipelines/amused/test_amused_inpaint.py",
"repo_id": "diffusers",
"token_count": 4713
} | 282 |
from langchain_community.document_transformers.long_context_reorder import (
LongContextReorder,
)
__all__ = ["LongContextReorder"]
| langchain/libs/langchain/langchain/document_transformers/long_context_reorder.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_transformers/long_context_reorder.py",
"repo_id": "langchain",
"token_count": 43
} | 521 |
import os
import torch
from datetime import timedelta
from loguru import logger
# Tensor Parallelism settings
RANK = int(os.getenv("RANK", "0"))
WORLD_SIZE = int(os.getenv("WORLD_SIZE", "1"))
# CUDA memory fraction
MEMORY_FRACTION = float(os.getenv("CUDA_MEMORY_FRACTION", "1.0"))
class FakeBarrier:
def wait(se... | text-generation-inference/server/text_generation_server/utils/dist.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/utils/dist.py",
"repo_id": "text-generation-inference",
"token_count": 1042
} | 449 |
# coding=utf-8
# Copyright 2023 Authors: Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan,
# Kaitao Song, Ding Liang, Tong Lu, Ping Luo, Ling Shao 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... | transformers/src/transformers/models/pvt/modeling_pvt.py/0 | {
"file_path": "transformers/src/transformers/models/pvt/modeling_pvt.py",
"repo_id": "transformers",
"token_count": 12226
} | 647 |
# LangChain Templates
LangChain Templates are the easiest and fastest way to build a production-ready LLM application.
These templates serve as a set of reference architectures for a wide variety of popular LLM use cases.
They are all in a standard format which make it easy to deploy them with [LangServe](https://gith... | langchain/templates/README.md/0 | {
"file_path": "langchain/templates/README.md",
"repo_id": "langchain",
"token_count": 1442
} | 645 |
/* eslint-disable no-process-env */
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { test, expect } from "@jest/globals";
import { VespaRetriever } from "../vespa.js";
test.skip("VespaRetriever", async () => {
const url = process.env.VESPA_URL!;
const query_body = {
yql: "select * from m... | langchainjs/libs/langchain-community/src/retrievers/tests/vespa.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/retrievers/tests/vespa.int.test.ts",
"repo_id": "langchainjs",
"token_count": 258
} | 991 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.