text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
// 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/pkg/config/manager.go/0 | {
"file_path": "milvus/pkg/config/manager.go",
"repo_id": "milvus",
"token_count": 3471
} | 2,086 |
pre {
white-space: break-spaces;
}
@media (min-width: 1200px) {
.container,
.container-lg,
.container-md,
.container-sm,
.container-xl {
max-width: 2560px !important;
}
}
#my-component-root *, #headlessui-portal-root * {
z-index: 10000;
}
.content-container p {
margin: revert;
} | langchainjs/docs/core_docs/docs/_static/css/custom.css/0 | {
"file_path": "langchainjs/docs/core_docs/docs/_static/css/custom.css",
"repo_id": "langchainjs",
"token_count": 131
} | 713 |
<jupyter_start><jupyter_text>Document AI: Fine-tuning Donut for document-parsing using Hugging Face Transformers on Amazon SageMakerIn this tutorial, you will learn how to fine-tune and deploy [Donut-base](https://huggingface.co/naver-clova-ix/donut-base) for document-understand/document-parsing using Hugging Face Tran... | notebooks/sagemaker/26_document_ai_donut/sagemaker-notebook.ipynb/0 | {
"file_path": "notebooks/sagemaker/26_document_ai_donut/sagemaker-notebook.ipynb",
"repo_id": "notebooks",
"token_count": 7780
} | 316 |
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core"]
[tool.codespell]
check-filenames = true
check-hidden = true
# Feel free to un-skip examples, and experimental, you will just need to
# work through many typos (--write-changes and --interactive will help)
skip = "*.csv,*.html,*.json,*.... | llama_index/llama-index-cli/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-cli/pyproject.toml",
"repo_id": "llama_index",
"token_count": 843
} | 1,172 |
from __future__ import annotations
from enum import Enum
from typing import Set
from langchain_experimental.pydantic_v1 import BaseModel, Field
class ThoughtValidity(Enum):
VALID_INTERMEDIATE = 0
VALID_FINAL = 1
INVALID = 2
class Thought(BaseModel):
text: str
validity: ThoughtValidity
chil... | langchain/libs/experimental/langchain_experimental/tot/thought.py/0 | {
"file_path": "langchain/libs/experimental/langchain_experimental/tot/thought.py",
"repo_id": "langchain",
"token_count": 154
} | 456 |
IMAGENET_DEFAULT_MEAN = [0.485, 0.456, 0.406]
IMAGENET_DEFAULT_STD = [0.229, 0.224, 0.225]
IMAGENET_STANDARD_MEAN = [0.5, 0.5, 0.5]
IMAGENET_STANDARD_STD = [0.5, 0.5, 0.5]
OPENAI_CLIP_MEAN = [0.48145466, 0.4578275, 0.40821073]
OPENAI_CLIP_STD = [0.26862954, 0.26130258, 0.27577711]
| transformers/src/transformers/utils/constants.py/0 | {
"file_path": "transformers/src/transformers/utils/constants.py",
"repo_id": "transformers",
"token_count": 162
} | 694 |
from llama_index.readers.myscale.base import (
MyScaleReader,
escape_str,
format_list_to_string,
)
__all__ = ["MyScaleReader", "escape_str", "format_list_to_string"]
| llama_index/llama-index-integrations/readers/llama-index-readers-myscale/llama_index/readers/myscale/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-myscale/llama_index/readers/myscale/__init__.py",
"repo_id": "llama_index",
"token_count": 72
} | 1,390 |
poetry_requirements(
name="poetry",
)
| llama_index/llama-index-integrations/embeddings/llama-index-embeddings-mistralai/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/embeddings/llama-index-embeddings-mistralai/BUILD",
"repo_id": "llama_index",
"token_count": 18
} | 1,319 |
use crate::tokenizer::{PreTokenizedString, PreTokenizer, Result, SplitDelimiterBehavior};
use crate::utils::macro_rules_attribute;
use unicode_categories::UnicodeCategories;
fn is_bert_punc(x: char) -> bool {
char::is_ascii_punctuation(&x) || x.is_punctuation()
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
#[mac... | tokenizers/tokenizers/src/pre_tokenizers/bert.rs/0 | {
"file_path": "tokenizers/tokenizers/src/pre_tokenizers/bert.rs",
"repo_id": "tokenizers",
"token_count": 1460
} | 460 |
# Diving deeper into policy-gradient methods
## Getting the big picture
We just learned that policy-gradient methods aim to find parameters \\( \theta \\) that **maximize the expected return**.
The idea is that we have a *parameterized stochastic policy*. In our case, a neural network outputs a probability distribut... | deep-rl-class/units/en/unit4/policy-gradient.mdx/0 | {
"file_path": "deep-rl-class/units/en/unit4/policy-gradient.mdx",
"repo_id": "deep-rl-class",
"token_count": 2364
} | 155 |
from typing import TYPE_CHECKING, Optional, Union
if TYPE_CHECKING:
from langchain.base_language import BaseLanguageModel
import os
from llama_index.core.llms.callbacks import CallbackManager
from llama_index.core.llms.llm import LLM
from llama_index.core.llms.mock import MockLLM
LLMType = Union[str, LLM, "Base... | llama_index/llama-index-core/llama_index/core/llms/utils.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/llms/utils.py",
"repo_id": "llama_index",
"token_count": 1744
} | 1,131 |
<!--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/vitdet.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/vitdet.md",
"repo_id": "transformers",
"token_count": 579
} | 490 |
use serde::de::Deserializer;
use serde::ser::Serializer;
use serde::{Deserialize, Serialize};
use std::sync::{Arc, RwLock};
pub fn serialize<S, T>(val: &Option<Arc<RwLock<T>>>, s: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
T: Serialize,
{
T::serialize(&*(val.clone().unwrap()).read().unwrap(), s)
}
pub f... | tokenizers/bindings/node/src/arc_rwlock_serde.rs/0 | {
"file_path": "tokenizers/bindings/node/src/arc_rwlock_serde.rs",
"repo_id": "tokenizers",
"token_count": 220
} | 410 |
<jupyter_start><jupyter_code>import argparse
import os
import torch
from torch.optim import AdamW
from torch.utils.data import DataLoader
from peft import (
get_peft_config,
get_peft_model,
get_peft_model_state_dict,
set_peft_model_state_dict,
PeftType,
PrefixTuningConfig,
PromptEncoderConf... | peft/examples/sequence_classification/Prompt_Tuning.ipynb/0 | {
"file_path": "peft/examples/sequence_classification/Prompt_Tuning.ipynb",
"repo_id": "peft",
"token_count": 2018
} | 344 |
# Readability Webpage Loader
Extracting relevant information from a fully rendered web page.
During the processing, it is always assumed that web pages used as data sources contain textual content.
It is particularly effective for websites that use client-side rendering.
1. Load the page and wait for it rendered. (p... | llama_index/llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/readability_web/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-web/llama_index/readers/web/readability_web/README.md",
"repo_id": "llama_index",
"token_count": 825
} | 1,468 |
"""Toolkit for interacting with Spark SQL."""
from typing import List
from langchain_core.language_models import BaseLanguageModel
from langchain_core.pydantic_v1 import Field
from langchain_community.agent_toolkits.base import BaseToolkit
from langchain_community.tools import BaseTool
from langchain_community.tools.... | langchain/libs/community/langchain_community/agent_toolkits/spark_sql/toolkit.py/0 | {
"file_path": "langchain/libs/community/langchain_community/agent_toolkits/spark_sql/toolkit.py",
"repo_id": "langchain",
"token_count": 408
} | 210 |
# Exit immediately for non zero status
set -e
release=${1:-"milvus-chaos"}
ns=${2:-"chaos-testing"}
kubectl delete milvus ${release} -n=${ns} || echo "delete milvus ${release} failed"
# uninstall helm release
helm_release_list=('minio' 'etcd' 'kafka' 'pulsar')
for helm_release in ${helm_release_list[*]}; do
echo ... | milvus/tests/python_client/chaos/scripts/uninstall_milvus_for_operator.sh/0 | {
"file_path": "milvus/tests/python_client/chaos/scripts/uninstall_milvus_for_operator.sh",
"repo_id": "milvus",
"token_count": 420
} | 2,115 |
# coding=utf-8
# Copyright 2024 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... | diffusers/scripts/convert_original_t2i_adapter.py/0 | {
"file_path": "diffusers/scripts/convert_original_t2i_adapter.py",
"repo_id": "diffusers",
"token_count": 6734
} | 227 |
"""Test common functions."""
import json
import unittest
from pathlib import Path
from langchain_robocorp._common import reduce_openapi_spec
from ._fixtures import openapi_endpoint_doc_mock
class TestReduceOpenAPISpec(unittest.TestCase):
maxDiff = None
def test_reduce_openapi_spec(self) -> None:
wi... | langchain/libs/partners/robocorp/tests/unit_tests/test_common.py/0 | {
"file_path": "langchain/libs/partners/robocorp/tests/unit_tests/test_common.py",
"repo_id": "langchain",
"token_count": 295
} | 625 |
version: 1
disable_existing_loggers: False
formatters:
default:
"()": uvicorn.logging.DefaultFormatter
format: '%(levelprefix)s [%(asctime)s] %(message)s'
use_colors: null
datefmt: '%d-%m-%Y %H:%M:%S'
access:
"()": uvicorn.logging.AccessFormatter
format: '%(levelprefix)s [%(asctime)s] %(clie... | chroma/chromadb/log_config.yml/0 | {
"file_path": "chroma/chromadb/log_config.yml",
"repo_id": "chroma",
"token_count": 391
} | 16 |
from typing import Any, Dict, Optional, Type, cast
from llama_index.legacy.bridge.pydantic import BaseModel
from llama_index.legacy.llms.llm import LLM
from llama_index.legacy.llms.openai import OpenAI
from llama_index.legacy.output_parsers.pydantic import PydanticOutputParser
from llama_index.legacy.prompts.base impo... | llama_index/llama-index-legacy/llama_index/legacy/program/llm_program.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/program/llm_program.py",
"repo_id": "llama_index",
"token_count": 2031
} | 1,589 |
use std::{fmt::Debug, sync::Arc};
use async_trait::async_trait;
use futures::Stream;
use tokio::select;
use super::{
executor::ComponentExecutor, sender::Sender, system::System, Receiver, ReceiverImpl, Wrapper,
};
#[derive(Debug, PartialEq)]
/// The state of a component
/// A component can be running or stopped
... | chroma/rust/worker/src/system/types.rs/0 | {
"file_path": "chroma/rust/worker/src/system/types.rs",
"repo_id": "chroma",
"token_count": 2450
} | 60 |
<jupyter_start><jupyter_text>Gradient`Gradient` allows to create `Embeddings` as well fine tune and get completions on LLMs with a simple web API.This notebook goes over how to use Langchain with Embeddings of [Gradient](https://gradient.ai/). Imports<jupyter_code>from langchain_community.embeddings import GradientEmb... | langchain/docs/docs/integrations/text_embedding/gradient.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/text_embedding/gradient.ipynb",
"repo_id": "langchain",
"token_count": 615
} | 164 |
from langchain_community.document_loaders.blob_loaders.youtube_audio import (
YoutubeAudioLoader,
)
__all__ = ["YoutubeAudioLoader"]
| langchain/libs/langchain/langchain/document_loaders/blob_loaders/youtube_audio.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/blob_loaders/youtube_audio.py",
"repo_id": "langchain",
"token_count": 45
} | 486 |
# Copyright 2022 - Intel Corp. All rights reserved.
# Authors: Mayank Kumar Raunak, Javier Turek, Nicole Beckage
"""
Implementation of a new method for fine-tuning transformer models that we call
Information Gain Filtration 'IGF' on WikiText data set and compared the results
with the standard fine-tuning method
Steps... | transformers/examples/research_projects/information-gain-filtration/run_clm_igf.py/0 | {
"file_path": "transformers/examples/research_projects/information-gain-filtration/run_clm_igf.py",
"repo_id": "transformers",
"token_count": 6229
} | 601 |
<jupyter_start><jupyter_text>Getting started with Owl-ViTIn this notebook, we are going to run the [OWL-ViT](https://arxiv.org/abs/2205.06230) model (an open-vocabulary object detection model) by Google Research on scikit-image samples images. OWL-ViT: A Quick IntroOWL-ViT is an open-vocabulary object detector. Given ... | notebooks/examples/zeroshot_object_detection_with_owlvit.ipynb/0 | {
"file_path": "notebooks/examples/zeroshot_object_detection_with_owlvit.ipynb",
"repo_id": "notebooks",
"token_count": 4929
} | 310 |
<jupyter_start><jupyter_text>Steam Game Recommendation & Game Details>[Steam (Wikipedia)](https://en.wikipedia.org/wiki/Steam_(service)) is a video game digital distribution service and storefront developed by `Valve Corporation`. It provides game updates automatically for Valve's games, and expanded to distributing th... | langchain/docs/docs/integrations/toolkits/steam.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/toolkits/steam.ipynb",
"repo_id": "langchain",
"token_count": 931
} | 180 |
<jupyter_start><jupyter_text>GradioThere are many 1000s of `Gradio` apps on `Hugging Face Spaces`. This library puts them at the tips of your LLM's fingers 🦾Specifically, `gradio-tools` is a Python library for converting `Gradio` apps into tools that can be leveraged by a large language model (LLM)-based agent to comp... | langchain/docs/docs/integrations/tools/gradio_tools.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/tools/gradio_tools.ipynb",
"repo_id": "langchain",
"token_count": 1036
} | 184 |
# Pre-tokenizers
<tokenizerslangcontent>
<python>
## BertPreTokenizer
[[autodoc]] tokenizers.pre_tokenizers.BertPreTokenizer
## ByteLevel
[[autodoc]] tokenizers.pre_tokenizers.ByteLevel
## CharDelimiterSplit
[[autodoc]] tokenizers.pre_tokenizers.CharDelimiterSplit
## Digits
[[autodoc]] tokenizers.pre_tokenizers... | tokenizers/docs/source-doc-builder/api/pre-tokenizers.mdx/0 | {
"file_path": "tokenizers/docs/source-doc-builder/api/pre-tokenizers.mdx",
"repo_id": "tokenizers",
"token_count": 371
} | 422 |
search_performance:
collections:
-
server:
db_config.primary_path: /test/milvus/db_data_gpu/sift_1b_2048_128_l2_sq8
cache_config.cpu_cache_capacity: 150
engine_config.use_blas_threshold: 1100
engine_config.gpu_search_threshold: 200
gpu_resource_config.enable: true
... | milvus/tests/benchmark/milvus_benchmark/suites/gpu_search_performance_sift1b.yaml/0 | {
"file_path": "milvus/tests/benchmark/milvus_benchmark/suites/gpu_search_performance_sift1b.yaml",
"repo_id": "milvus",
"token_count": 1084
} | 2,009 |
# Model arguments
model_name_or_path: alignment-handbook/zephyr-7b-sft-qlora
torch_dtype: bfloat16
# LoRA arguments
use_peft: true
load_in_4bit: true
lora_r: 128
lora_alpha: 128
lora_dropout: 0.05
lora_target_modules:
- q_proj
- k_proj
- v_proj
- o_proj
- gate_proj
- up_proj
- down_proj
# Data training arguments
dat... | alignment-handbook/recipes/zephyr-7b-beta/dpo/config_qlora.yaml/0 | {
"file_path": "alignment-handbook/recipes/zephyr-7b-beta/dpo/config_qlora.yaml",
"repo_id": "alignment-handbook",
"token_count": 478
} | 24 |
from robocorp_action_server.agent import agent_executor
__all__ = ["agent_executor"]
| langchain/templates/robocorp-action-server/robocorp_action_server/__init__.py/0 | {
"file_path": "langchain/templates/robocorp-action-server/robocorp_action_server/__init__.py",
"repo_id": "langchain",
"token_count": 28
} | 754 |
<jupyter_start><jupyter_text>Baseten[Baseten](https://baseten.co) is a [Provider](https://python.langchain.com/docs/integrations/providers/baseten) in the LangChain ecosystem that implements the LLMs component.This example demonstrates using an LLM — Mistral 7B hosted on Baseten — with LangChain. SetupTo run this exam... | langchain/docs/docs/integrations/llms/baseten.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/llms/baseten.ipynb",
"repo_id": "langchain",
"token_count": 1117
} | 112 |
<!--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/ja/run_scripts.md/0 | {
"file_path": "transformers/docs/source/ja/run_scripts.md",
"repo_id": "transformers",
"token_count": 8185
} | 499 |
[package]
name = "candle-flash-attn"
version = "0.4.0"
edition = "2021"
description = "Flash attention layer for the candle ML framework."
repository = "https://github.com/huggingface/candle"
keywords = ["blas", "tensor", "machine-learning"]
categories = ["science"]
license = "MIT OR Apache-2.0"
readme = "README.md"
... | candle/candle-flash-attn/Cargo.toml/0 | {
"file_path": "candle/candle-flash-attn/Cargo.toml",
"repo_id": "candle",
"token_count": 266
} | 49 |
import type { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
import { BasePromptTemplate } from "@langchain/core/prompts";
import { LLMChain } from "../llm_chain.js";
import {
StuffDocumentsChain,
MapReduceDocumentsChain,
RefineDocumentsChain,
MapReduceDocumentsChainInput,
} from "../... | langchainjs/langchain/src/chains/summarization/load.ts/0 | {
"file_path": "langchainjs/langchain/src/chains/summarization/load.ts",
"repo_id": "langchainjs",
"token_count": 1154
} | 931 |
import os
from typing import Any
from unittest.mock import Mock
import pytest
from _pytest.monkeypatch import MonkeyPatch
from langchain_core.documents import Document
from pytest_mock import MockerFixture
from langchain_community.document_loaders.onenote import OneNoteLoader
def test_initialization() -> None:
... | langchain/libs/community/tests/unit_tests/document_loaders/test_onenote.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/document_loaders/test_onenote.py",
"repo_id": "langchain",
"token_count": 2389
} | 411 |
// 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/datacoord/meta.go/0 | {
"file_path": "milvus/internal/datacoord/meta.go",
"repo_id": "milvus",
"token_count": 17784
} | 1,686 |
import os
from glob import glob
import imageio
import torch
import torchvision
import wandb
from img_processing import custom_to_pil, loop_post_process, preprocess, preprocess_vqgan
from loaders import load_vqgan
from PIL import Image
from torch import nn
from transformers import CLIPModel, CLIPTokenizerFast
from uti... | transformers/examples/research_projects/vqgan-clip/VQGAN_CLIP.py/0 | {
"file_path": "transformers/examples/research_projects/vqgan-clip/VQGAN_CLIP.py",
"repo_id": "transformers",
"token_count": 4997
} | 540 |
#[macro_use]
extern crate criterion;
mod common;
use std::fs::File;
use std::io::{BufRead, BufReader};
use std::path::Path;
use criterion::Criterion;
use tokenizers::models::wordpiece::{WordPiece, WordPieceTrainerBuilder};
use tokenizers::normalizers::{BertNormalizer, NormalizerWrapper};
use tokenizers::pre_tokenize... | tokenizers/tokenizers/benches/bert_benchmark.rs/0 | {
"file_path": "tokenizers/tokenizers/benches/bert_benchmark.rs",
"repo_id": "tokenizers",
"token_count": 1642
} | 475 |
from llama_index.core.llms.base import BaseLLM
from llama_index.llms.llama_api import LlamaAPI
def test_embedding_class():
names_of_base_classes = [b.__name__ for b in LlamaAPI.__mro__]
assert BaseLLM.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/llms/llama-index-llms-llama-api/tests/test_llms_llama_api.py/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-llama-api/tests/test_llms_llama_api.py",
"repo_id": "llama_index",
"token_count": 95
} | 1,313 |
<!--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/big_bird.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/big_bird.md",
"repo_id": "transformers",
"token_count": 1682
} | 498 |
from langchain_core.prompts import ChatPromptTemplate
from langchain_openai import ChatOpenAI
_prompt = ChatPromptTemplate.from_messages(
[
(
"system",
"You are a helpful assistant who speaks like a pirate",
),
("human", "{text}"),
]
)
_model = ChatOpenAI()
# if... | langchain/libs/cli/langchain_cli/package_template/package_template/chain.py/0 | {
"file_path": "langchain/libs/cli/langchain_cli/package_template/package_template/chain.py",
"repo_id": "langchain",
"token_count": 178
} | 215 |
<jupyter_start><jupyter_text>Llama-cppThis notebook goes over how to use Llama-cpp embeddings within LangChain<jupyter_code>%pip install --upgrade --quiet llama-cpp-python
from langchain_community.embeddings import LlamaCppEmbeddings
llama = LlamaCppEmbeddings(model_path="/path/to/model/ggml-model-q4_0.bin")
text = "T... | langchain/docs/docs/integrations/text_embedding/llamacpp.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/text_embedding/llamacpp.ipynb",
"repo_id": "langchain",
"token_count": 164
} | 170 |
from langchain_community.vectorstores.meilisearch import Meilisearch
__all__ = ["Meilisearch"]
| langchain/libs/langchain/langchain/vectorstores/meilisearch.py/0 | {
"file_path": "langchain/libs/langchain/langchain/vectorstores/meilisearch.py",
"repo_id": "langchain",
"token_count": 31
} | 615 |
<!---
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 ... | peft/README.md/0 | {
"file_path": "peft/README.md",
"repo_id": "peft",
"token_count": 3409
} | 318 |
use crate::tokenizer::{NormalizedString, Normalizer, Result};
use crate::utils::macro_rules_attribute;
use serde::{Deserialize, Serialize};
use unicode_normalization_alignments::char::is_combining_mark;
#[derive(Copy, Clone, Debug, Deserialize, Serialize)]
#[serde(tag = "type")]
#[non_exhaustive]
pub struct Strip {
... | tokenizers/tokenizers/src/normalizers/strip.rs/0 | {
"file_path": "tokenizers/tokenizers/src/normalizers/strip.rs",
"repo_id": "tokenizers",
"token_count": 2512
} | 478 |
import os
import json
import time
import pinecone
import pandas as pd
import altair as alt
import streamlit as st
from typing import List
from langchain.vectorstores import Pinecone
from langchain.llms import Anthropic
from langchain.chat_models import ChatOpenAI
from langchain.evaluation.qa import QAEvalChain
from lan... | auto-evaluator/streamlit/auto-evaluator.py/0 | {
"file_path": "auto-evaluator/streamlit/auto-evaluator.py",
"repo_id": "auto-evaluator",
"token_count": 6134
} | 6 |
# @langchain/anthropic
This package contains the LangChain.js integrations for Anthropic through their SDK.
## Installation
```bash npm2yarn
npm install @langchain/anthropic
```
This package, along with the main LangChain package, depends on [`@langchain/core`](https://npmjs.com/package/@langchain/core/).
If you ar... | langchainjs/libs/langchain-anthropic/README.md/0 | {
"file_path": "langchainjs/libs/langchain-anthropic/README.md",
"repo_id": "langchainjs",
"token_count": 922
} | 971 |
// Default generic "any" values are for backwards compatibility.
// Replace with "string" when we are comfortable with a breaking change.
import type { InputValues } from "../utils/types.js";
import {
type StringPromptValueInterface,
StringPromptValue,
} from "../prompt_values.js";
import { BasePromptTemplate, typ... | langchainjs/langchain-core/src/prompts/string.ts/0 | {
"file_path": "langchainjs/langchain-core/src/prompts/string.ts",
"repo_id": "langchainjs",
"token_count": 390
} | 878 |
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from typing import List, Optional, Tuple
from text_generation_server.models import CausalLM
class RW(CausalLM):
def __init__(
self,
model_id: str,
revision: Optional[str] = None,
quantize: Optional[str] = N... | text-generation-inference/server/text_generation_server/models/rw.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/models/rw.py",
"repo_id": "text-generation-inference",
"token_count": 1270
} | 426 |
from langchain_community.document_loaders.image_captions import ImageCaptionLoader
__all__ = ["ImageCaptionLoader"]
| langchain/libs/langchain/langchain/document_loaders/image_captions.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/image_captions.py",
"repo_id": "langchain",
"token_count": 33
} | 486 |
import random
import numpy as np
import torch
def random_seed(seed=42, rank=0):
torch.manual_seed(seed + rank)
np.random.seed(seed + rank)
random.seed(seed + rank)
| pytorch-image-models/timm/utils/random.py/0 | {
"file_path": "pytorch-image-models/timm/utils/random.py",
"repo_id": "pytorch-image-models",
"token_count": 68
} | 390 |
import neo4j from "neo4j-driver";
import * as uuid from "uuid";
import type { EmbeddingsInterface } from "@langchain/core/embeddings";
import { VectorStore } from "@langchain/core/vectorstores";
import { Document } from "@langchain/core/documents";
export type SearchType = "vector" | "hybrid";
export type DistanceStr... | langchainjs/libs/langchain-community/src/vectorstores/neo4j_vector.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/vectorstores/neo4j_vector.ts",
"repo_id": "langchainjs",
"token_count": 8619
} | 979 |
"""Spotify reader."""
from typing import List, Optional
from llama_index.core.readers.base import BaseReader
from llama_index.core.schema import Document
class SpotifyReader(BaseReader):
"""Spotify Reader.
Read a user's saved albums, tracks, or playlists from Spotify.
"""
def load_data(self, coll... | llama_index/llama-index-integrations/readers/llama-index-readers-spotify/llama_index/readers/spotify/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-spotify/llama_index/readers/spotify/base.py",
"repo_id": "llama_index",
"token_count": 1042
} | 1,434 |
export * from "./criteria.js";
| langchainjs/langchain/src/evaluation/criteria/index.ts/0 | {
"file_path": "langchainjs/langchain/src/evaluation/criteria/index.ts",
"repo_id": "langchainjs",
"token_count": 11
} | 954 |
export * from "@langchain/core/tracers/base";
| langchainjs/langchain/src/callbacks/handlers/tracer.ts/0 | {
"file_path": "langchainjs/langchain/src/callbacks/handlers/tracer.ts",
"repo_id": "langchainjs",
"token_count": 15
} | 888 |
import { ChatCohere } from "@langchain/cohere";
import { HumanMessage } from "@langchain/core/messages";
const model = new ChatCohere({
apiKey: process.env.COHERE_API_KEY, // Default
model: "command", // Default
});
const conversationId = `demo_test_id-${Math.random()}`;
const response = await model.invoke(
[n... | langchainjs/examples/src/models/chat/cohere/stateful_conversation.ts/0 | {
"file_path": "langchainjs/examples/src/models/chat/cohere/stateful_conversation.ts",
"repo_id": "langchainjs",
"token_count": 397
} | 801 |
export async function extractEmbeddings(
worker,
weightsURL,
tokenizerURL,
configURL,
modelID,
sentences,
updateStatus,
normalize_embeddings = true
) {
return new Promise((resolve, reject) => {
worker.postMessage({
weightsURL,
tokenizerURL,
configURL,
modelID,
sentenc... | candle/candle-wasm-examples/t5/utils.js/0 | {
"file_path": "candle/candle-wasm-examples/t5/utils.js",
"repo_id": "candle",
"token_count": 2339
} | 87 |
import { test, expect } from "@jest/globals";
import { Fireworks } from "../fireworks.js";
describe("Fireworks", () => {
test("call", async () => {
const model = new Fireworks({ maxTokens: 50 });
const res = await model.call("1 + 1 = ");
console.log({ res });
});
test("generate", async () => {
c... | langchainjs/libs/langchain-community/src/llms/tests/fireworks.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/llms/tests/fireworks.int.test.ts",
"repo_id": "langchainjs",
"token_count": 216
} | 947 |
from langchain.schema.chat_history import __all__
EXPECTED_ALL = ["BaseChatMessageHistory"]
def test_all_imports() -> None:
assert set(__all__) == set(EXPECTED_ALL)
| langchain/libs/langchain/tests/unit_tests/schema/test_chat_history.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/schema/test_chat_history.py",
"repo_id": "langchain",
"token_count": 62
} | 634 |
from langchain_astradb.vectorstores import AstraDBVectorStore
__all__ = [
"AstraDBVectorStore",
]
| langchain/libs/partners/astradb/langchain_astradb/__init__.py/0 | {
"file_path": "langchain/libs/partners/astradb/langchain_astradb/__init__.py",
"repo_id": "langchain",
"token_count": 37
} | 622 |
import ts from "typescript";
import * as fs from "fs";
export function identifySecrets() {
const secrets = new Set();
const tsConfig = ts.parseJsonConfigFileContent(
ts.readJsonConfigFile("./tsconfig.json", (p) =>
fs.readFileSync(p, "utf-8")
),
ts.sys,
"./src/"
);
for (const fileName of... | langchainjs/libs/langchain-scripts/scripts/identify-secrets.js/0 | {
"file_path": "langchainjs/libs/langchain-scripts/scripts/identify-secrets.js",
"repo_id": "langchainjs",
"token_count": 1436
} | 1,032 |
/* eslint-disable prefer-template */
import {
AsyncCaller,
AsyncCallerParams,
} from "@langchain/core/utils/async_caller";
import type { EmbeddingsInterface } from "@langchain/core/embeddings";
import {
VectorStore,
MaxMarginalRelevanceSearchOptions,
} from "@langchain/core/vectorstores";
import { Document } fr... | langchainjs/libs/langchain-community/src/vectorstores/cassandra.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/vectorstores/cassandra.ts",
"repo_id": "langchainjs",
"token_count": 8361
} | 1,012 |
import asyncio
from threading import Thread
from typing import Any, List, Optional, Type
from llama_index.legacy.callbacks import CallbackManager, trace_method
from llama_index.legacy.chat_engine.types import (
AgentChatResponse,
BaseChatEngine,
StreamingAgentChatResponse,
)
from llama_index.legacy.core.ll... | llama_index/llama-index-legacy/llama_index/legacy/chat_engine/simple.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/chat_engine/simple.py",
"repo_id": "llama_index",
"token_count": 2605
} | 1,643 |
<jupyter_start><jupyter_text>---sidebar_position: 0--- QuickstartLangChain has a number of components designed to help build question-answering applications, and RAG applications more generally. To familiarize ourselves with these, we’ll build a simple Q&A application over a text data source. Along the way we’ll go ov... | langchainjs/docs/core_docs/docs/use_cases/question_answering/quickstart.ipynb/0 | {
"file_path": "langchainjs/docs/core_docs/docs/use_cases/question_answering/quickstart.ipynb",
"repo_id": "langchainjs",
"token_count": 5716
} | 799 |
# Generate Parser with Antlr4
## Install Antlr4
Please follow [install antlr4](https://github.com/antlr/antlr4/blob/master/doc/go-target.md) to install the antlr tool.
The version of antlr tool: `4.9`.
## Code Generate
After you install the antlr4, you can generate the parser code in golang with:
```shell
go gene... | milvus/internal/parser/planparserv2/README.md/0 | {
"file_path": "milvus/internal/parser/planparserv2/README.md",
"repo_id": "milvus",
"token_count": 124
} | 1,817 |
import { ChainValues } from "@langchain/core/utils/types";
import { CallbackManagerForChainRun } from "@langchain/core/callbacks/manager";
import { BaseChain, ChainInputs } from "./base.js";
import {
TextSplitter,
RecursiveCharacterTextSplitter,
} from "../text_splitter.js";
import { SerializedAnalyzeDocumentChain ... | langchainjs/langchain/src/chains/analyze_documents_chain.ts/0 | {
"file_path": "langchainjs/langchain/src/chains/analyze_documents_chain.ts",
"repo_id": "langchainjs",
"token_count": 1190
} | 952 |
import { test, expect } from "@jest/globals";
import * as fs from "node:fs/promises";
import * as path from "node:path";
import * as os from "node:os";
import { fileURLToPath } from "node:url";
import { OpenAIEmbeddings } from "@langchain/openai";
import { Document } from "@langchain/core/documents";
import { FaissSto... | langchainjs/libs/langchain-community/src/vectorstores/tests/faiss.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/vectorstores/tests/faiss.int.test.ts",
"repo_id": "langchainjs",
"token_count": 2290
} | 1,008 |
import { test } from "@jest/globals";
import { OpenAI } from "@langchain/openai";
import { LLMChain } from "../llm_chain.js";
import { APIChain, APIChainInput } from "../api/api_chain.js";
import {
API_URL_PROMPT_TEMPLATE,
API_RESPONSE_PROMPT_TEMPLATE,
} from "../api/prompts.js";
import { OPEN_METEO_DOCS } from "./... | langchainjs/langchain/src/chains/tests/api_chain.int.test.ts/0 | {
"file_path": "langchainjs/langchain/src/chains/tests/api_chain.int.test.ts",
"repo_id": "langchainjs",
"token_count": 683
} | 896 |
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"data": {
"values": "<DVC_METRIC_DATA>"
},
"title": "<DVC_METRIC_TITLE>",
"mark": {
"type": "line"
},
"encoding": {
"x": {
"field": "<DVC_METRIC_X>",
"type": "quantitative",
... | datasets/.dvc/plots/default.json/0 | {
"file_path": "datasets/.dvc/plots/default.json",
"repo_id": "datasets",
"token_count": 419
} | 107 |
export {
ListOutputParser,
CommaSeparatedListOutputParser,
CustomListOutputParser,
} from "@langchain/core/output_parsers";
| langchainjs/langchain/src/output_parsers/list.ts/0 | {
"file_path": "langchainjs/langchain/src/output_parsers/list.ts",
"repo_id": "langchainjs",
"token_count": 42
} | 953 |
[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 = ["PDFTableReader"]
contains_example = false
import_path = "llama_index.readers.pdf_table"
... | llama_index/llama-index-integrations/readers/llama-index-readers-pdf-table/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-pdf-table/pyproject.toml",
"repo_id": "llama_index",
"token_count": 701
} | 1,417 |
<jupyter_start><jupyter_text>Finetuning Whisper-large-V2 on Colab using PEFT-Lora + BNB INT8 training In this Colab, we present a step-by-step guide on how to fine-tune Whisper for any multilingual ASR dataset using Hugging Face 🤗 Transformers and 🤗 PEFT. Using 🤗 PEFT and `bitsandbytes`, you can train the `whisper-l... | peft/examples/int8_training/peft_bnb_whisper_large_v2_training.ipynb/0 | {
"file_path": "peft/examples/int8_training/peft_bnb_whisper_large_v2_training.ipynb",
"repo_id": "peft",
"token_count": 7675
} | 339 |
poetry_requirements(
name="poetry",
module_mapping={"ionic-api-sdk": ["ionic"]}
)
| llama_index/llama-index-integrations/tools/llama-index-tools-ionic-shopping/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-ionic-shopping/BUILD",
"repo_id": "llama_index",
"token_count": 39
} | 1,487 |
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Sample RSS feed subscriptions</title>
</head>
<body>
<outline text="Tech" title="Tech">
<outline type="rss" text="Engadget" title="Engadget" xmlUrl="http://www.engadget.com/rss-full.xml" htmlUrl="http://ww... | langchain/libs/community/tests/examples/sample_rss_feeds.opml/0 | {
"file_path": "langchain/libs/community/tests/examples/sample_rss_feeds.opml",
"repo_id": "langchain",
"token_count": 245
} | 346 |
import { ConneryService } from "@langchain/community/tools/connery";
import { ConneryToolkit } from "@langchain/community/agents/toolkits/connery";
import { ChatOpenAI } from "@langchain/openai";
import { initializeAgentExecutorWithOptions } from "langchain/agents";
// Specify your Connery Runner credentials.
process.... | langchainjs/examples/src/agents/connery_mrkl.ts/0 | {
"file_path": "langchainjs/examples/src/agents/connery_mrkl.ts",
"repo_id": "langchainjs",
"token_count": 406
} | 755 |
# This first_section was backported from nginx
loading_datasets: loading
share_dataset: share
quicktour: quickstart
dataset_streaming: stream
torch_tensorflow: use_dataset
splits: loading#slice-splits
processing: process
faiss_and_ea: faiss_es
features: about_dataset_features
using_metrics: how_to_metrics
exploring: ac... | datasets/docs/source/_redirects.yml/0 | {
"file_path": "datasets/docs/source/_redirects.yml",
"repo_id": "datasets",
"token_count": 134
} | 119 |
apiVersion: apps/v1
kind: Deployment
metadata:
name: worker
namespace: chroma
spec:
replicas: 1
selector:
matchLabels:
app: worker
template:
metadata:
labels:
app: worker
member-type: worker
spec:
containers:
- name: worker
image: worker
... | chroma/k8s/dev/worker.yaml/0 | {
"file_path": "chroma/k8s/dev/worker.yaml",
"repo_id": "chroma",
"token_count": 536
} | 53 |
// 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/mq/mqimpl/rocksmq/server/global_rmq_test.go/0 | {
"file_path": "milvus/internal/mq/mqimpl/rocksmq/server/global_rmq_test.go",
"repo_id": "milvus",
"token_count": 588
} | 1,833 |
# 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/loaders/single_file.py/0 | {
"file_path": "diffusers/src/diffusers/loaders/single_file.py",
"repo_id": "diffusers",
"token_count": 4986
} | 228 |
/* eslint-disable */
// tslint:disable
/**
* FastAPI
*
*
* OpenAPI spec version: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator+.
* https://github.com/karlvr/openapi-generator-plus
* Do not edit the class manually.
*/
export interface ConfigurationParameters {
apiKey?: string | ((name: ... | chroma/clients/js/src/generated/configuration.ts/0 | {
"file_path": "chroma/clients/js/src/generated/configuration.ts",
"repo_id": "chroma",
"token_count": 466
} | 32 |
# coding=utf-8
# Copyright 2022 The OpenAI 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/licenses/L... | transformers/src/transformers/models/whisper/modeling_flax_whisper.py/0 | {
"file_path": "transformers/src/transformers/models/whisper/modeling_flax_whisper.py",
"repo_id": "transformers",
"token_count": 32247
} | 752 |
from langchain_community.callbacks.llmonitor_callback import (
LLMonitorCallbackHandler,
)
__all__ = [
"LLMonitorCallbackHandler",
]
| langchain/libs/langchain/langchain/callbacks/llmonitor_callback.py/0 | {
"file_path": "langchain/libs/langchain/langchain/callbacks/llmonitor_callback.py",
"repo_id": "langchain",
"token_count": 46
} | 457 |
"""Embedding utils for LlamaIndex."""
import os
from typing import TYPE_CHECKING, List, Optional, Union
if TYPE_CHECKING:
from llama_index.legacy.bridge.langchain import Embeddings as LCEmbeddings
from llama_index.legacy.embeddings.base import BaseEmbedding
from llama_index.legacy.embeddings.clip import ClipEmbed... | llama_index/llama-index-legacy/llama_index/legacy/embeddings/utils.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/embeddings/utils.py",
"repo_id": "llama_index",
"token_count": 1544
} | 1,588 |
"""Retrieval evaluators."""
from typing import Any, List, Optional, Sequence, Tuple
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.bridge.pydantic import Field
from llama_index.core.evaluation.retrieval.base import (
BaseRetrievalEvaluator,
RetrievalEvalMode,
)
from llama... | llama_index/llama-index-core/llama_index/core/evaluation/retrieval/evaluator.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/evaluation/retrieval/evaluator.py",
"repo_id": "llama_index",
"token_count": 1978
} | 1,172 |
"""Init params."""
| llama_index/llama-index-legacy/llama_index/legacy/query_engine/flare/__init__.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/query_engine/flare/__init__.py",
"repo_id": "llama_index",
"token_count": 6
} | 1,697 |
/* eslint-disable no-process-env */
import { test } from "@jest/globals";
import { castValue, isFloat, isInt, isString } from "../utils.js";
test("Casting values correctly", () => {
const stringString = [
"string",
"test",
"this is a string",
" ",
"\n\n\n\n\n\n",
`asdf
zxcv`,
];
... | langchainjs/langchain/src/retrievers/self_query/tests/utils.test.ts/0 | {
"file_path": "langchainjs/langchain/src/retrievers/self_query/tests/utils.test.ts",
"repo_id": "langchainjs",
"token_count": 547
} | 983 |
<jupyter_start><jupyter_text>Finetuning an Adapter on Top of any Black-Box Embedding ModelWe have capabilities in LlamaIndex allowing you to fine-tune an adapter on top of embeddings produced from any model (sentence_transformers, OpenAI, and more). This allows you to transform your embedding representations into a new... | llama_index/docs/examples/finetuning/embeddings/finetune_embedding_adapter.ipynb/0 | {
"file_path": "llama_index/docs/examples/finetuning/embeddings/finetune_embedding_adapter.ipynb",
"repo_id": "llama_index",
"token_count": 4191
} | 1,105 |
import copy
import warnings
from dataclasses import InitVar, dataclass, field
from pathlib import Path
from typing import Any, Dict, Optional, Union
from .. import config
@dataclass
class DownloadConfig:
"""Configuration for our cached path manager.
Attributes:
cache_dir (`str` or `Path`, *optional*... | datasets/src/datasets/download/download_config.py/0 | {
"file_path": "datasets/src/datasets/download/download_config.py",
"repo_id": "datasets",
"token_count": 1880
} | 130 |
# Multi Subject DreamBooth training
[DreamBooth](https://arxiv.org/abs/2208.12242) is a method to personalize text2image models like stable diffusion given just a few(3~5) images of a subject.
This `train_multi_subject_dreambooth.py` script shows how to implement the training procedure for one or more subjects and ada... | diffusers/examples/research_projects/multi_subject_dreambooth/README.md/0 | {
"file_path": "diffusers/examples/research_projects/multi_subject_dreambooth/README.md",
"repo_id": "diffusers",
"token_count": 4807
} | 219 |
import { DataSourceOptions } from "typeorm";
import { OpenAIEmbeddings } from "@langchain/openai";
import { TypeORMVectorStore } from "@langchain/community/vectorstores/typeorm";
// First, follow set-up instructions at
// https://js.langchain.com/docs/modules/indexes/vector_stores/integrations/typeorm
export const ru... | langchainjs/examples/src/indexes/vector_stores/typeorm_vectorstore/typeorm.ts/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/typeorm_vectorstore/typeorm.ts",
"repo_id": "langchainjs",
"token_count": 337
} | 791 |
#!/usr/bin/env bash
set -eo pipefail
# Absolute path to the toplevel milvus directory.
toplevel=$(dirname "$(cd "$(dirname "${0}")"; pwd)")
if [[ "$IS_NETWORK_MODE_HOST" == "true" ]]; then
sed -i '/builder:/,/^\s*$/s/image: \${IMAGE_REPO}\/milvus-env:\${OS_NAME}-\${DATE_VERSION}/&\n network_mode: "host"/' $topl... | milvus/build/builder.sh/0 | {
"file_path": "milvus/build/builder.sh",
"repo_id": "milvus",
"token_count": 583
} | 1,620 |
from langchain_core.prompts import ChatPromptTemplate, PromptTemplate
# Used to condense a question and chat history into a single question
condense_question_prompt_template = """Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question, in its original lang... | langchain/templates/rag-self-query/rag_self_query/prompts.py/0 | {
"file_path": "langchain/templates/rag-self-query/rag_self_query/prompts.py",
"repo_id": "langchain",
"token_count": 402
} | 746 |
## 9. Data Service
#### 9.1 Overview
<img src="./figs/data_coord.png" width=700>
#### 9.2 Data Service Interface
```go
type DataCoord interface {
Component
TimeTickProvider
// Flush notifies DataCoord to flush all current growing segments of specified Collection
Flush(ctx context.Context, req *datapb.FlushReq... | milvus/docs/developer_guides/chap09_data_coord.md/0 | {
"file_path": "milvus/docs/developer_guides/chap09_data_coord.md",
"repo_id": "milvus",
"token_count": 3417
} | 1,633 |
"""Integration tests for the TensorFlow Dataset Loader."""
from __future__ import annotations
from typing import TYPE_CHECKING
import pytest
from langchain_core.documents import Document
from langchain_core.pydantic_v1 import ValidationError
from langchain_community.document_loaders.tensorflow_datasets import (
... | langchain/libs/community/tests/integration_tests/document_loaders/test_tensorflow_datasets.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/document_loaders/test_tensorflow_datasets.py",
"repo_id": "langchain",
"token_count": 1301
} | 347 |
package coordinator
import (
"context"
"testing"
"github.com/chroma/chroma-coordinator/internal/model"
"github.com/chroma/chroma-coordinator/internal/notification"
"github.com/chroma/chroma-coordinator/internal/types"
)
const (
defaultTenant = "default_tenant"
defaultDatabase = "default_database"
)
func Te... | chroma/go/coordinator/internal/metastore/coordinator/memory_catalog_test.go/0 | {
"file_path": "chroma/go/coordinator/internal/metastore/coordinator/memory_catalog_test.go",
"repo_id": "chroma",
"token_count": 1600
} | 48 |
from langchain_community.document_loaders.cube_semantic import CubeSemanticLoader
__all__ = ["CubeSemanticLoader"]
| langchain/libs/langchain/langchain/document_loaders/cube_semantic.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/cube_semantic.py",
"repo_id": "langchain",
"token_count": 33
} | 512 |
# sql-ollama
This template enables a user to interact with a SQL database using natural language.
It uses [Zephyr-7b](https://huggingface.co/HuggingFaceH4/zephyr-7b-alpha) via [Ollama](https://ollama.ai/library/zephyr) to run inference locally on a Mac laptop.
## Environment Setup
Before using this template, you n... | langchain/templates/sql-ollama/README.md/0 | {
"file_path": "langchain/templates/sql-ollama/README.md",
"repo_id": "langchain",
"token_count": 787
} | 737 |
# coding=utf-8
# Copyright 2018 T5 Authors and 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... | transformers/src/transformers/models/t5/tokenization_t5_fast.py/0 | {
"file_path": "transformers/src/transformers/models/t5/tokenization_t5_fast.py",
"repo_id": "transformers",
"token_count": 4621
} | 737 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.