text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
<!--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/perf_train_gpu_many.md/0 | {
"file_path": "transformers/docs/source/en/perf_train_gpu_many.md",
"repo_id": "transformers",
"token_count": 10509
} | 471 |
// 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/impl.go/0 | {
"file_path": "milvus/internal/proxy/impl.go",
"repo_id": "milvus",
"token_count": 69377
} | 1,743 |
"""Empty index.
An index that doesn't contain any documents. Can only be used for
pure LLM calls.
"""
from typing import Any, Dict, Optional, Sequence
from llama_index.legacy.core.base_query_engine import BaseQueryEngine
from llama_index.legacy.core.base_retriever import BaseRetriever
from llama_index.legacy.data_s... | llama_index/llama-index-legacy/llama_index/legacy/indices/empty/base.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/indices/empty/base.py",
"repo_id": "llama_index",
"token_count": 1103
} | 1,660 |
from llama_index.packs.deeplake_multimodal_retrieval.base import (
DeepLakeMultimodalRetrieverPack,
)
__all__ = ["DeepLakeMultimodalRetrieverPack"]
| llama_index/llama-index-packs/llama-index-packs-deeplake-multimodal-retrieval/llama_index/packs/deeplake_multimodal_retrieval/__init__.py/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-deeplake-multimodal-retrieval/llama_index/packs/deeplake_multimodal_retrieval/__init__.py",
"repo_id": "llama_index",
"token_count": 61
} | 1,665 |
// 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/querynodev2/delegator/deletebuffer/list_delete_buffer.go/0 | {
"file_path": "milvus/internal/querynodev2/delegator/deletebuffer/list_delete_buffer.go",
"repo_id": "milvus",
"token_count": 852
} | 1,869 |
import { AgentExecutor } from "langchain/agents";
import { ChatOpenAI } from "@langchain/openai";
import { Calculator } from "langchain/tools/calculator";
import { OpenAIFunctionsAgentOutputParser } from "langchain/agents/openai/output_parser";
import { convertToOpenAIFunction } from "@langchain/core/utils/function_cal... | langchainjs/examples/src/agents/openai_runnable_stream.ts/0 | {
"file_path": "langchainjs/examples/src/agents/openai_runnable_stream.ts",
"repo_id": "langchainjs",
"token_count": 1375
} | 784 |
#[cfg(feature = "mkl")]
extern crate intel_mkl_src;
#[cfg(feature = "accelerate")]
extern crate accelerate_src;
use clap::{Parser, ValueEnum};
use candle::{DType, IndexOp, D};
use candle_nn::{Module, VarBuilder};
use candle_transformers::models::repvgg;
#[derive(Clone, Copy, Debug, ValueEnum)]
enum Which {
A0,
... | candle/candle-examples/examples/repvgg/main.rs/0 | {
"file_path": "candle/candle-examples/examples/repvgg/main.rs",
"repo_id": "candle",
"token_count": 1518
} | 43 |
/** eslint-disable @typescript-eslint/no-non-null-assertion */
import { test, expect } from "@jest/globals";
import { ChatOpenAI } from "@langchain/openai";
import type { ChatPromptTemplate } from "@langchain/core/prompts";
import { TavilySearchResults } from "@langchain/community/tools/tavily_search";
import { pull }... | langchainjs/langchain/src/agents/tests/create_openai_functions_agent.int.test.ts/0 | {
"file_path": "langchainjs/langchain/src/agents/tests/create_openai_functions_agent.int.test.ts",
"repo_id": "langchainjs",
"token_count": 826
} | 842 |
import { StructuredTool } from "@langchain/core/tools";
/**
* Type alias for StructuredTool. It is part of the tools module in
* LangChain, which includes a variety of tools used for different
* purposes.
*/
export type ObjectTool = StructuredTool;
export const FINISH_NAME = "finish";
/**
* Interface that descr... | langchainjs/langchain/src/experimental/autogpt/schema.ts/0 | {
"file_path": "langchainjs/langchain/src/experimental/autogpt/schema.ts",
"repo_id": "langchainjs",
"token_count": 204
} | 921 |
search_performance:
collections:
# -
# server:
# db_config.primary_path: /test/milvus/db_data_7/sub_50m_512_512_sub_wal
# cache_config.cpu_cache_capacity: 32
# engine_config.use_blas_threshold: 1100
# engine_config.gpu_search_threshold: 1
# gpu_resource_config.enable... | milvus/tests/benchmark/milvus_benchmark/suites/cpu_search_binary.yaml/0 | {
"file_path": "milvus/tests/benchmark/milvus_benchmark/suites/cpu_search_binary.yaml",
"repo_id": "milvus",
"token_count": 1110
} | 2,151 |
// 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/core/src/exec/expression/CompareExpr.cpp/0 | {
"file_path": "milvus/internal/core/src/exec/expression/CompareExpr.cpp",
"repo_id": "milvus",
"token_count": 5806
} | 1,784 |
# Access intermediate steps
In order to get more visibility into what an agent is doing, we can also return intermediate steps. This comes in the form of an extra key in the return value.
All you need to do is initialize the AgentExecutor with `return_intermediate_steps=True`:
import CodeBlock from "@theme/CodeBlock... | langchainjs/docs/core_docs/docs/modules/agents/how_to/intermediate_steps.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/modules/agents/how_to/intermediate_steps.mdx",
"repo_id": "langchainjs",
"token_count": 176
} | 780 |
import pickle
import pytest
from llama_index.legacy.llms import ChatMessage, MessageRole
from llama_index.legacy.memory.chat_memory_buffer import ChatMemoryBuffer
from llama_index.legacy.utils import get_tokenizer
tokenizer = get_tokenizer()
USER_CHAT_MESSAGE = ChatMessage(role=MessageRole.USER, content="first messa... | llama_index/llama-index-legacy/tests/memory/test_chat_memory_buffer.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/memory/test_chat_memory_buffer.py",
"repo_id": "llama_index",
"token_count": 2724
} | 1,808 |
import { ChatOpenAI } from "@langchain/openai";
import { ChatPromptTemplate } from "@langchain/core/prompts";
import { DatetimeOutputParser } from "langchain/output_parsers";
const parser = new DatetimeOutputParser();
const prompt = ChatPromptTemplate.fromTemplate(`Answer the users question:
{question}
{format_inst... | langchainjs/examples/src/prompts/datetime_parser.ts/0 | {
"file_path": "langchainjs/examples/src/prompts/datetime_parser.ts",
"repo_id": "langchainjs",
"token_count": 220
} | 812 |
import re
from collections import defaultdict
from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Dict, List
if TYPE_CHECKING:
from presidio_analyzer import RecognizerResult
from presidio_anonymizer.entities import EngineResult
MappingDataType = Dict[str, Dict[str, str]]
def format_du... | langchain/libs/experimental/langchain_experimental/data_anonymizer/deanonymizer_mapping.py/0 | {
"file_path": "langchain/libs/experimental/langchain_experimental/data_anonymizer/deanonymizer_mapping.py",
"repo_id": "langchain",
"token_count": 1940
} | 417 |
import { Tool, type ToolParams } from "@langchain/core/tools";
/**
* @example
* ```typescript
* const tool = new WolframAlphaTool({
* appid: "YOUR_APP_ID",
* });
* const res = await tool.invoke("What is 2 * 2?");
* ```
*/
export class WolframAlphaTool extends Tool {
appid: string;
name = "wolfram_alpha"... | langchainjs/libs/langchain-community/src/tools/wolframalpha.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/tools/wolframalpha.ts",
"repo_id": "langchainjs",
"token_count": 323
} | 1,078 |
"""Query Tree using embedding similarity between query and node text."""
import logging
from typing import Any, Dict, List, Optional, Tuple, cast
from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.core.callbacks.base import CallbackManager
from llama_index.core.indices.tree.base import T... | llama_index/llama-index-core/llama_index/core/indices/tree/select_leaf_embedding_retriever.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/indices/tree/select_leaf_embedding_retriever.py",
"repo_id": "llama_index",
"token_count": 2620
} | 1,132 |
# LlamaIndex Response Synthesizers Integration: Google
| llama_index/llama-index-integrations/response_synthesizers/llama-index-response-synthesizers-google/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/response_synthesizers/llama-index-response-synthesizers-google/README.md",
"repo_id": "llama_index",
"token_count": 12
} | 1,406 |
"""Test Vertex AI API wrapper.
Your end-user credentials would be used to make the calls (make sure you've run
`gcloud auth login` first).
"""
import pytest
from langchain_google_vertexai.embeddings import VertexAIEmbeddings
def test_initialization() -> None:
"""Test embedding model initialization."""
Verte... | langchain/libs/partners/google-vertexai/tests/integration_tests/test_embeddings.py/0 | {
"file_path": "langchain/libs/partners/google-vertexai/tests/integration_tests/test_embeddings.py",
"repo_id": "langchain",
"token_count": 846
} | 625 |
from llama_index.core.storage.kvstore.types import BaseKVStore
from llama_index.storage.kvstore.firestore import FirestoreKVStore
def test_class():
names_of_base_classes = [b.__name__ for b in FirestoreKVStore.__mro__]
assert BaseKVStore.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-firestore/tests/test_storage_kvstore_firestore.py/0 | {
"file_path": "llama_index/llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-firestore/tests/test_storage_kvstore_firestore.py",
"repo_id": "llama_index",
"token_count": 102
} | 1,424 |
# Airbyte Salesforce Loader
The Airbyte Salesforce Loader allows you to access different Salesforce objects.
## Installation
- Install llama_hub: `pip install llama_hub`
- Install the salesforce source: `pip install airbyte-source-salesforce`
## Usage
Here's an example usage of the AirbyteSalesforceReader.
```pyt... | llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-salesforce/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-salesforce/README.md",
"repo_id": "llama_index",
"token_count": 1056
} | 1,259 |
<jupyter_start><jupyter_text>SpaCy>[spaCy](https://spacy.io/) is an open-source software library for advanced natural language processing, written in the programming languages Python and Cython. Installation and Setup<jupyter_code>%pip install --upgrade --quiet spacy<jupyter_output><empty_output><jupyter_text>Import ... | langchain/docs/docs/integrations/text_embedding/spacy_embedding.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/text_embedding/spacy_embedding.ipynb",
"repo_id": "langchain",
"token_count": 600
} | 166 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_upscale.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_upscale.py",
"repo_id": "diffusers",
"token_count": 12550
} | 253 |
# Module Guides
```{toctree}
---
maxdepth: 1
---
../../../examples/data_connectors/simple_directory_reader.ipynb
../../../examples/data_connectors/PsychicDemo.ipynb
../../../examples/data_connectors/DeepLakeReader.ipynb
../../../examples/data_connectors/QdrantDemo.ipynb
../../../examples/data_connectors/DiscordDemo.ip... | llama_index/docs/module_guides/loading/connector/modules.md/0 | {
"file_path": "llama_index/docs/module_guides/loading/connector/modules.md",
"repo_id": "llama_index",
"token_count": 518
} | 1,156 |
# flake8: noqa
"""Tools for interacting with Spark SQL."""
from typing import Any, Dict, Optional
from langchain_core.pydantic_v1 import BaseModel, Field, root_validator
from langchain_core.language_models import BaseLanguageModel
from langchain_core.callbacks import (
AsyncCallbackManagerForToolRun,
Callback... | langchain/libs/community/langchain_community/tools/spark_sql/tool.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/spark_sql/tool.py",
"repo_id": "langchain",
"token_count": 1697
} | 294 |
{
"input_variables": ["foo"]
} | langchain/libs/langchain/tests/unit_tests/data/prompts/prompt_missing_args.json/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/data/prompts/prompt_missing_args.json",
"repo_id": "langchain",
"token_count": 14
} | 602 |
# 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 applicabl... | accelerate/benchmarks/big_model_inference.py/0 | {
"file_path": "accelerate/benchmarks/big_model_inference.py",
"repo_id": "accelerate",
"token_count": 2241
} | 0 |
"""Tool for the Google Scholar"""
from typing import Optional
from langchain_core.callbacks import CallbackManagerForToolRun
from langchain_core.tools import BaseTool
from langchain_community.utilities.google_scholar import GoogleScholarAPIWrapper
class GoogleScholarQueryRun(BaseTool):
"""Tool that queries the... | langchain/libs/community/langchain_community/tools/google_scholar/tool.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/google_scholar/tool.py",
"repo_id": "langchain",
"token_count": 294
} | 301 |
from __future__ import annotations
from typing import Any, Iterator, List, Optional
from langchain_core.embeddings import Embeddings
from langchain_core.pydantic_v1 import BaseModel
def _chunk(texts: List[str], size: int) -> Iterator[List[str]]:
for i in range(0, len(texts), size):
yield texts[i : i + s... | langchain/libs/community/langchain_community/embeddings/javelin_ai_gateway.py/0 | {
"file_path": "langchain/libs/community/langchain_community/embeddings/javelin_ai_gateway.py",
"repo_id": "langchain",
"token_count": 1756
} | 268 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.airbyte_zendesk_support import AirbyteZendeskSupportReader
def test_class():
names_of_base_classes = [b.__name__ for b in AirbyteZendeskSupportReader.__mro__]
assert BaseReader.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-zendesk-support/tests/test_readers_airbyte_zendesk_support.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-airbyte-zendesk-support/tests/test_readers_airbyte_zendesk_support.py",
"repo_id": "llama_index",
"token_count": 105
} | 1,458 |
use hf_hub::{
api::sync::{Api, ApiRepo},
Repo, RepoType,
};
use parquet::file::reader::SerializedFileReader;
use std::fs::File;
#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error("ApiError : {0}")]
ApiError(#[from] hf_hub::api::sync::ApiError),
#[error("IoError : {0}")]
IoError(#[from... | candle/candle-datasets/src/hub.rs/0 | {
"file_path": "candle/candle-datasets/src/hub.rs",
"repo_id": "candle",
"token_count": 900
} | 45 |
# 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}}/modeling_flax_{{cookiecutter.lowercase_modelname}}.py/0 | {
"file_path": "transformers/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/modeling_flax_{{cookiecutter.lowercase_modelname}}.py",
"repo_id": "transformers",
"token_count": 60288
} | 711 |
import gc
import unittest
import numpy as np
import torch
from transformers import CLIPTextConfig, CLIPTextModel, CLIPTokenizer
import diffusers
from diffusers import (
AnimateDiffPipeline,
AutoencoderKL,
DDIMScheduler,
MotionAdapter,
UNet2DConditionModel,
UNetMotionModel,
)
from diffusers.uti... | diffusers/tests/pipelines/animatediff/test_animatediff.py/0 | {
"file_path": "diffusers/tests/pipelines/animatediff/test_animatediff.py",
"repo_id": "diffusers",
"token_count": 6179
} | 276 |
<jupyter_start><jupyter_text>Chroma multi-modal RAGMany documents contain a mixture of content types, including text and images. Yet, information captured in images is lost in most RAG applications.With the emergence of multimodal LLMs, like [GPT-4V](https://openai.com/research/gpt-4v-system-card), it is worth consider... | langchain/cookbook/multi_modal_RAG_chroma.ipynb/0 | {
"file_path": "langchain/cookbook/multi_modal_RAG_chroma.ipynb",
"repo_id": "langchain",
"token_count": 3577
} | 79 |
package indexnode
import (
"context"
"fmt"
"math/rand"
"sync"
"time"
"golang.org/x/exp/mmap"
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus/internal/proto/etcdpb"
"github.com/milvus-io/milvus/internal/proto/indexpb"
"github.com/milvus-io/milvus/internal/storage"
"githu... | milvus/internal/indexnode/chunkmgr_mock.go/0 | {
"file_path": "milvus/internal/indexnode/chunkmgr_mock.go",
"repo_id": "milvus",
"token_count": 2666
} | 1,713 |
<jupyter_start><jupyter_code># %pip install-r requirements.txt
from IPython.display import clear_output, Image, display
import PIL.Image
import io
import json
import torch
import numpy as np
from processing_image import Preprocess
from visualizing_image import SingleImageViz
from modeling_frcnn import GeneralizedRCNN
f... | transformers/examples/research_projects/lxmert/demo.ipynb/0 | {
"file_path": "transformers/examples/research_projects/lxmert/demo.ipynb",
"repo_id": "transformers",
"token_count": 1973
} | 591 |
Training from memory
----------------------------------------------------------------------------------------------------
In the `Quicktour <quicktour>`__, we saw how to build and train a tokenizer using text files,
but we can actually use any Python Iterator. In this section we'll see a few different ways of
training... | tokenizers/docs/source/tutorials/python/training_from_memory.rst/0 | {
"file_path": "tokenizers/docs/source/tutorials/python/training_from_memory.rst",
"repo_id": "tokenizers",
"token_count": 1149
} | 470 |
GIT_ROOT ?= $(shell git rev-parse --show-toplevel)
help: ## Show all Makefile targets.
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[33m%-30s\033[0m %s\n", $$1, $$2}'
format: ## Run code autoformatters (black).
pre-commit install
pre-commit run black --all-files
... | llama_index/llama-index-legacy/Makefile/0 | {
"file_path": "llama_index/llama-index-legacy/Makefile",
"repo_id": "llama_index",
"token_count": 254
} | 1,542 |
from langchain_community.document_loaders.datadog_logs import DatadogLogsLoader
__all__ = ["DatadogLogsLoader"]
| langchain/libs/langchain/langchain/document_loaders/datadog_logs.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/datadog_logs.py",
"repo_id": "langchain",
"token_count": 39
} | 504 |
#!/usr/bin/env bash
# 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... | milvus/scripts/generate_proto.sh/0 | {
"file_path": "milvus/scripts/generate_proto.sh",
"repo_id": "milvus",
"token_count": 1530
} | 1,952 |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LI... | transformers/tests/sagemaker/scripts/pytorch/run_glue_model_parallelism.py/0 | {
"file_path": "transformers/tests/sagemaker/scripts/pytorch/run_glue_model_parallelism.py",
"repo_id": "transformers",
"token_count": 9571
} | 754 |
// Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | milvus/internal/core/unittest/test_scalar_index.cpp/0 | {
"file_path": "milvus/internal/core/unittest/test_scalar_index.cpp",
"repo_id": "milvus",
"token_count": 6428
} | 1,955 |
from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.tools.metaphor import MetaphorToolSpec
def test_class():
names_of_base_classes = [b.__name__ for b in MetaphorToolSpec.__mro__]
assert BaseToolSpec.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/tools/llama-index-tools-metaphor/tests/test_tools_metaphor.py/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-metaphor/tests/test_tools_metaphor.py",
"repo_id": "llama_index",
"token_count": 97
} | 1,623 |
# Simple Milvus systemd service file
#
# systemd supports lots of fancy features, look here (and linked docs) for a full list:
# http://www.freedesktop.org/software/systemd/man/systemd.exec.html
#
# Note: this file ( /usr/lib/systemd/system/milvus-etcd.service )
# will be overwritten on package upgrade, please copy t... | milvus/build/rpm/services/milvus-etcd.service/0 | {
"file_path": "milvus/build/rpm/services/milvus-etcd.service",
"repo_id": "milvus",
"token_count": 283
} | 1,836 |
<jupyter_start><jupyter_text>Building a Yahoo Finance AgentThis tutorial walks you through the process of building a Yahoo Finance Agent using the `yahoo_finance` tool. The agent will be able to retrieve stock data, financial statements, and other financial information from Yahoo Finance.<jupyter_code>!pip install llam... | llama_index/llama-index-integrations/tools/llama-index-tools-yahoo-finance/examples/yahoo_finance.ipynb/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-yahoo-finance/examples/yahoo_finance.ipynb",
"repo_id": "llama_index",
"token_count": 419
} | 1,503 |
/* eslint-disable no-promise-executor-return */
/* eslint-disable @typescript-eslint/no-explicit-any */
import { test } from "@jest/globals";
import { z } from "zod";
import { RunnableLambda } from "../index.js";
import { ChatPromptTemplate } from "../../prompts/chat.js";
import {
FakeListChatModel,
FakeRetriever,... | langchainjs/langchain-core/src/runnables/tests/runnable_stream_events.test.ts/0 | {
"file_path": "langchainjs/langchain-core/src/runnables/tests/runnable_stream_events.test.ts",
"repo_id": "langchainjs",
"token_count": 8120
} | 867 |
# coding=utf-8
# Copyright 2022 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... | transformers/src/transformers/models/jukebox/convert_jukebox.py/0 | {
"file_path": "transformers/src/transformers/models/jukebox/convert_jukebox.py",
"repo_id": "transformers",
"token_count": 5498
} | 649 |
# Preprocess Loader
[Preprocess](https://preprocess.co) is an API service that splits any kind of document into optimal chunks of text for use in language model tasks.
Given documents in input `Preprocess` splits them into chunks of text that respect the layout and semantics of the original document.
We split the cont... | llama_index/llama-index-integrations/readers/llama-index-readers-preprocess/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-preprocess/README.md",
"repo_id": "llama_index",
"token_count": 1084
} | 1,507 |
[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 = ["FuzzyCitationEnginePack"]
contains_example = false
import_path = "llama_index.packs.fuzzy... | llama_index/llama-index-packs/llama-index-packs-fuzzy-citation/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-fuzzy-citation/pyproject.toml",
"repo_id": "llama_index",
"token_count": 696
} | 1,654 |
#include<stdint.h>
#include "cuda_fp16.h"
template<typename T>
__device__ void fill_with(T *buf, T value, const size_t numel) {
for (unsigned int i = blockIdx.x * blockDim.x + threadIdx.x; i < numel; i += blockDim.x * gridDim.x) {
buf[i] = value;
}
}
extern "C" __global__ void fill_u8(uint8_t *buf, uin... | candle/candle-kernels/src/fill.cu/0 | {
"file_path": "candle/candle-kernels/src/fill.cu",
"repo_id": "candle",
"token_count": 472
} | 58 |
#!/usr/bin/env bash
# for seqeval metrics import
pip install -r ../requirements.txt
## The relevant files are currently on a shared Google
## drive at https://drive.google.com/drive/folders/1kC0I2UGl2ltrluI9NqDjaQJGw5iliw_J
## Monitor for changes and eventually migrate to use the `datasets` library
curl -L 'https://d... | transformers/examples/legacy/pytorch-lightning/run_ner.sh/0 | {
"file_path": "transformers/examples/legacy/pytorch-lightning/run_ner.sh",
"repo_id": "transformers",
"token_count": 724
} | 555 |
<!--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... | diffusers/docs/source/en/training/instructpix2pix.md/0 | {
"file_path": "diffusers/docs/source/en/training/instructpix2pix.md",
"repo_id": "diffusers",
"token_count": 4160
} | 191 |
#!/usr/bin/env bash
# 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... | milvus/scripts/run_go_codecov.sh/0 | {
"file_path": "milvus/scripts/run_go_codecov.sh",
"repo_id": "milvus",
"token_count": 713
} | 1,930 |
# coding=utf-8
# Copyright 2022 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... | transformers/src/transformers/models/owlvit/processing_owlvit.py/0 | {
"file_path": "transformers/src/transformers/models/owlvit/processing_owlvit.py",
"repo_id": "transformers",
"token_count": 4505
} | 675 |
python_sources()
| llama_index/llama-index-core/llama_index/core/objects/BUILD/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/objects/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,203 |
<!--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/model_doc/code_llama.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/code_llama.md",
"repo_id": "transformers",
"token_count": 4010
} | 495 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/mobilebert.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/mobilebert.md",
"repo_id": "transformers",
"token_count": 1548
} | 511 |
use candle_core::{test_device, test_utils, Device, IndexOp, Result, Tensor};
// https://github.com/huggingface/candle/issues/364
fn avg_pool2d(dev: &Device) -> Result<()> {
let data: Vec<f32> = vec![
1., 1., 1., 1., 0., 0., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
];
let t = Tensor::from_vec(data, (... | candle/candle-core/tests/pool_tests.rs/0 | {
"file_path": "candle/candle-core/tests/pool_tests.rs",
"repo_id": "candle",
"token_count": 2083
} | 39 |
"""PyTorch SelecSLS Net example for ImageNet Classification
License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/legalcode)
Author: Dushyant Mehta (@mehtadushy)
SelecSLS (core) Network Architecture as proposed in "XNect: Real-time Multi-person 3D
Human Pose Estimation with a Single RGB Camera, Mehta et al."... | pytorch-image-models/timm/models/selecsls.py/0 | {
"file_path": "pytorch-image-models/timm/models/selecsls.py",
"repo_id": "pytorch-image-models",
"token_count": 6442
} | 377 |
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | transformers/tests/models/beit/test_modeling_beit.py/0 | {
"file_path": "transformers/tests/models/beit/test_modeling_beit.py",
"repo_id": "transformers",
"token_count": 9542
} | 720 |
import torch
from diffusers import LMSDiscreteScheduler
from diffusers.utils.testing_utils import torch_device
from .test_schedulers import SchedulerCommonTest
class LMSDiscreteSchedulerTest(SchedulerCommonTest):
scheduler_classes = (LMSDiscreteScheduler,)
num_inference_steps = 10
def get_scheduler_con... | diffusers/tests/schedulers/test_scheduler_lms.py/0 | {
"file_path": "diffusers/tests/schedulers/test_scheduler_lms.py",
"repo_id": "diffusers",
"token_count": 2696
} | 293 |
# (Legacy) SE-ResNet
**SE ResNet** is a variant of a [ResNet](https://www.paperswithcode.com/method/resnet) that employs [squeeze-and-excitation blocks](https://paperswithcode.com/method/squeeze-and-excitation-block) to enable the network to perform dynamic channel-wise feature recalibration.
{% include 'code_snippet... | pytorch-image-models/docs/models/.templates/models/legacy-se-resnet.md/0 | {
"file_path": "pytorch-image-models/docs/models/.templates/models/legacy-se-resnet.md",
"repo_id": "pytorch-image-models",
"token_count": 2886
} | 361 |
import { getEnvironmentVariable } from "@langchain/core/utils/env";
import { Tool } from "@langchain/core/tools";
type JSONPrimitive = string | number | boolean | null;
type JSONValue = JSONPrimitive | JSONObject | JSONArray;
interface JSONObject {
[key: string]: JSONValue;
}
interface JSONArray extends Array<JSONVa... | langchainjs/libs/langchain-community/src/tools/searchapi.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/tools/searchapi.ts",
"repo_id": "langchainjs",
"token_count": 2104
} | 972 |
from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.tools.shopify import ShopifyToolSpec
def test_class():
names_of_base_classes = [b.__name__ for b in ShopifyToolSpec.__mro__]
assert BaseToolSpec.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/tools/llama-index-tools-shopify/tests/test_tools_shopify.py/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-shopify/tests/test_tools_shopify.py",
"repo_id": "llama_index",
"token_count": 94
} | 1,499 |
from typing import TYPE_CHECKING, List, Optional, Sequence, cast
from llama_index.legacy.program.guidance_program import GuidancePydanticProgram
from llama_index.legacy.prompts.guidance_utils import convert_to_handlebars
from llama_index.legacy.prompts.mixin import PromptDictType
from llama_index.legacy.question_gen.p... | llama_index/llama-index-legacy/llama_index/legacy/question_gen/guidance_generator.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/question_gen/guidance_generator.py",
"repo_id": "llama_index",
"token_count": 981
} | 1,700 |
<!---
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/examples/pytorch/text-generation/README.md/0 | {
"file_path": "transformers/examples/pytorch/text-generation/README.md",
"repo_id": "transformers",
"token_count": 350
} | 591 |
python_tests()
| llama_index/llama-index-integrations/postprocessor/llama-index-postprocessor-presidio/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/postprocessor/llama-index-postprocessor-presidio/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,354 |
import { logVersion010MigrationWarning } from "../util/entrypoint_deprecation.js";
/* #__PURE__ */ logVersion010MigrationWarning({
oldEntrypointName: "tools/brave_search",
});
export * from "@langchain/community/tools/brave_search";
| langchainjs/langchain/src/tools/brave_search.ts/0 | {
"file_path": "langchainjs/langchain/src/tools/brave_search.ts",
"repo_id": "langchainjs",
"token_count": 74
} | 955 |
# LlamaIndex Callbacks Integration: DeepEval
| llama_index/llama-index-integrations/callbacks/llama-index-callbacks-honeyhive/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/callbacks/llama-index-callbacks-honeyhive/README.md",
"repo_id": "llama_index",
"token_count": 12
} | 1,246 |
import { TextLoader } from "langchain/document_loaders/fs/text";
const loader = new TextLoader("src/document_loaders/example_data/example.txt");
const docs = await loader.load();
| langchainjs/examples/src/document_loaders/text.ts/0 | {
"file_path": "langchainjs/examples/src/document_loaders/text.ts",
"repo_id": "langchainjs",
"token_count": 53
} | 801 |
<jupyter_start><jupyter_text>MediaWiki Dump>[MediaWiki XML Dumps](https://www.mediawiki.org/wiki/Manual:Importing_XML_dumps) contain the content of a wiki (wiki pages with all their revisions), without the site-related data. A XML dump does not create a full backup of the wiki database, the dump does not contain user a... | langchain/docs/docs/integrations/document_loaders/mediawikidump.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/mediawikidump.ipynb",
"repo_id": "langchain",
"token_count": 514
} | 115 |
from langchain_core.outputs import __all__
EXPECTED_ALL = [
"ChatGeneration",
"ChatGenerationChunk",
"ChatResult",
"Generation",
"GenerationChunk",
"LLMResult",
"RunInfo",
]
def test_all_imports() -> None:
assert set(__all__) == set(EXPECTED_ALL)
| langchain/libs/core/tests/unit_tests/outputs/test_imports.py/0 | {
"file_path": "langchain/libs/core/tests/unit_tests/outputs/test_imports.py",
"repo_id": "langchain",
"token_count": 120
} | 446 |
(function (ss, ex) {
window.ldfdr =
window.ldfdr ||
function () {
(ldfdr._q = ldfdr._q || []).push([].slice.call(arguments));
};
(function (d, s) {
fs = d.getElementsByTagName(s)[0];
function ce(src) {
var cs = d.createElement(s);
cs.src = src;
cs.async = 1;
fs.pare... | llama_index/docs/_static/js/leadfeeder.js/0 | {
"file_path": "llama_index/docs/_static/js/leadfeeder.js",
"repo_id": "llama_index",
"token_count": 276
} | 1,089 |
import { useCallback, useEffect, useReducer, useState } from "react";
import orderBy from "lodash/orderBy";
import { v4 as uuidv4 } from "uuid";
export interface Message {
type: string;
content:
| string
| { page_content: string; metadata: Record<string, object> }[]
| object;
name?: string;
additio... | opengpts/frontend/src/hooks/useChatList.ts/0 | {
"file_path": "opengpts/frontend/src/hooks/useChatList.ts",
"repo_id": "opengpts",
"token_count": 986
} | 2,060 |
poetry_requirements(
name="poetry",
)
python_requirements(
name="reqs",
)
| llama_index/llama-index-packs/llama-index-packs-infer-retrieve-rerank/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-infer-retrieve-rerank/BUILD",
"repo_id": "llama_index",
"token_count": 36
} | 1,660 |
from rag_google_cloud_sensitive_data_protection.chain import chain
__all__ = ["chain"]
| langchain/templates/rag-google-cloud-sensitive-data-protection/rag_google_cloud_sensitive_data_protection/__init__.py/0 | {
"file_path": "langchain/templates/rag-google-cloud-sensitive-data-protection/rag_google_cloud_sensitive_data_protection/__init__.py",
"repo_id": "langchain",
"token_count": 26
} | 697 |
#!/usr/bin/env python
"""Example of a chat server with persistence handled on the backend.
For simplicity, we're using file storage here -- to avoid the need to set up
a database. This is obviously not a good idea for a production environment,
but will help us to demonstrate the RunnableWithMessageHistory interface.
... | langserve/examples/chat_with_persistence_and_user/server.py/0 | {
"file_path": "langserve/examples/chat_with_persistence_and_user/server.py",
"repo_id": "langserve",
"token_count": 2291
} | 1,124 |
import os
from cassandra.auth import PlainTextAuthProvider
from cassandra.cluster import Cluster
def get_cassandra_connection():
contact_points = [
cp.strip()
for cp in os.environ.get("CASSANDRA_CONTACT_POINTS", "").split(",")
if cp.strip()
]
CASSANDRA_KEYSPACE = os.environ["CASSA... | langchain/templates/cassandra-entomology-rag/cassandra_entomology_rag/cassandra_cluster_init.py/0 | {
"file_path": "langchain/templates/cassandra-entomology-rag/cassandra_entomology_rag/cassandra_cluster_init.py",
"repo_id": "langchain",
"token_count": 381
} | 667 |
import random
import numpy
import pandas as pd
import pytest
from pymilvus import DataType
from base.client_base import TestcaseBase
from common import common_func as cf
from common import common_type as ct
from common.common_type import CaseLabel, CheckTasks
from utils.util_pymilvus import *
from utils.util_log impo... | milvus/tests/python_client/testcases/test_collection.py/0 | {
"file_path": "milvus/tests/python_client/testcases/test_collection.py",
"repo_id": "milvus",
"token_count": 94757
} | 1,981 |
import pytest
from llama_index.core.ingestion.transformations import (
ConfigurableTransformations,
ConfiguredTransformation,
)
from llama_index.core.node_parser.text import SentenceSplitter, TokenTextSplitter
@pytest.mark.parametrize(
"configurable_transformation_type", ConfigurableTransformations
)
def ... | llama_index/llama-index-core/tests/ingestion/test_transformations.py/0 | {
"file_path": "llama_index/llama-index-core/tests/ingestion/test_transformations.py",
"repo_id": "llama_index",
"token_count": 813
} | 1,267 |
import { test, describe, expect } from "@jest/globals";
import { AlephAlpha } from "../aleph_alpha.js";
describe("Aleph Alpha", () => {
test("test call", async () => {
const aleph_alpha = new AlephAlpha({});
const result = await aleph_alpha.call(
"What is a good name for a company that makes colorful s... | langchainjs/libs/langchain-community/src/llms/tests/aleph_alpha.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/llms/tests/aleph_alpha.int.test.ts",
"repo_id": "langchainjs",
"token_count": 596
} | 986 |
Components
====================================================================================================
When building a Tokenizer, you can attach various types of components to this Tokenizer in order
to customize its behavior. This page lists most provided components.
.. _normalizers:
.. entities:: python
... | tokenizers/docs/source/components.rst/0 | {
"file_path": "tokenizers/docs/source/components.rst",
"repo_id": "tokenizers",
"token_count": 4236
} | 424 |
#!/usr/bin/env python3
import json
from typing import Iterator, List, Union
from tokenizers import AddedToken, Regex, Tokenizer, decoders, normalizers, pre_tokenizers, trainers
from tokenizers.implementations.base_tokenizer import BaseTokenizer
from tokenizers.models import Unigram
from tokenizers.processors import Te... | transformers/examples/flax/language-modeling/t5_tokenizer_model.py/0 | {
"file_path": "transformers/examples/flax/language-modeling/t5_tokenizer_model.py",
"repo_id": "transformers",
"token_count": 1755
} | 567 |
from xml_agent.agent import agent_executor
__all__ = ["agent_executor"]
| langchain/templates/xml-agent/xml_agent/__init__.py/0 | {
"file_path": "langchain/templates/xml-agent/xml_agent/__init__.py",
"repo_id": "langchain",
"token_count": 24
} | 696 |
"""Test splitting with page numbers included."""
import os
from langchain_community.document_loaders import PyPDFLoader
from langchain_community.embeddings.openai import OpenAIEmbeddings
from langchain_community.vectorstores import FAISS
def test_pdf_pagesplitter() -> None:
"""Test splitting with page numbers in... | langchain/libs/langchain/tests/integration_tests/test_pdf_pagesplitter.py/0 | {
"file_path": "langchain/libs/langchain/tests/integration_tests/test_pdf_pagesplitter.py",
"repo_id": "langchain",
"token_count": 246
} | 619 |
"""StackExchange API toolkit."""
| langchain/libs/community/langchain_community/tools/stackexchange/__init__.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/stackexchange/__init__.py",
"repo_id": "langchain",
"token_count": 10
} | 310 |
import torch
from diffusers import StableDiffusionPipeline
model_id = "path-to-your-trained-model"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16).to("cuda")
prompt = "A photo of sks dog in a bucket"
image = pipe(prompt, num_inference_steps=50, guidance_scale=7.5).images[0]
imag... | diffusers/examples/research_projects/colossalai/inference.py/0 | {
"file_path": "diffusers/examples/research_projects/colossalai/inference.py",
"repo_id": "diffusers",
"token_count": 127
} | 223 |
from datetime import datetime
from typing import List
from llama_index.core.readers.base import BaseReader
from llama_index.core.schema import Document
from llama_index.readers.earnings_call_transcript.utils import get_earnings_transcript
class EarningsCallTranscript(BaseReader):
def __init__(self, year: int, ti... | llama_index/llama-index-integrations/readers/llama-index-readers-earnings-call-transcript/llama_index/readers/earnings_call_transcript/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-earnings-call-transcript/llama_index/readers/earnings_call_transcript/base.py",
"repo_id": "llama_index",
"token_count": 657
} | 1,486 |
# coding=utf-8
# Copyright 2022 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... | transformers/src/transformers/models/poolformer/convert_poolformer_original_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/poolformer/convert_poolformer_original_to_pytorch.py",
"repo_id": "transformers",
"token_count": 3259
} | 681 |
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
@import url("https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@200;300;400&family=Source+Sans+3:wght@100;200;300;400;500;600;700;800;900&display=swap");... | candle/candle-wasm-examples/blip/index.html/0 | {
"file_path": "candle/candle-wasm-examples/blip/index.html",
"repo_id": "candle",
"token_count": 7164
} | 82 |
import unittest
import warnings
from dataclasses import dataclass
from transformers.convert_slow_tokenizer import SpmConverter
from transformers.testing_utils import get_tests_dir
@dataclass
class FakeOriginalTokenizer:
vocab_file: str
class ConvertSlowTokenizerTest(unittest.TestCase):
def test_spm_convert... | transformers/tests/utils/test_convert_slow_tokenizer.py/0 | {
"file_path": "transformers/tests/utils/test_convert_slow_tokenizer.py",
"repo_id": "transformers",
"token_count": 524
} | 841 |
from langchain_community.retrievers.pubmed import PubMedRetriever
__all__ = [
"PubMedRetriever",
]
| langchain/libs/community/langchain_community/retrievers/pupmed.py/0 | {
"file_path": "langchain/libs/community/langchain_community/retrievers/pupmed.py",
"repo_id": "langchain",
"token_count": 38
} | 278 |
import argparse
import logging
import sys
from unittest.mock import patch
import run_glue_deebert
from transformers.testing_utils import TestCasePlus, get_gpu_count, require_torch_non_multi_gpu, slow
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger()
def get_setup_file():
parser = argparse... | transformers/examples/research_projects/deebert/test_glue_deebert.py/0 | {
"file_path": "transformers/examples/research_projects/deebert/test_glue_deebert.py",
"repo_id": "transformers",
"token_count": 1863
} | 583 |
python_tests()
| llama_index/llama-index-integrations/tools/llama-index-tools-metaphor/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-metaphor/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,443 |
import {
LlamaModel,
LlamaContext,
LlamaChatSession,
type ConversationInteraction,
} from "node-llama-cpp";
import {
SimpleChatModel,
type BaseChatModelParams,
} from "@langchain/core/language_models/chat_models";
import type { BaseLanguageModelCallOptions } from "@langchain/core/language_models/base";
imp... | langchainjs/libs/langchain-community/src/chat_models/llama_cpp.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/chat_models/llama_cpp.ts",
"repo_id": "langchainjs",
"token_count": 3709
} | 937 |
from langchain_core.runnables.configurable import (
DynamicRunnable,
RunnableConfigurableAlternatives,
RunnableConfigurableFields,
StrEnum,
make_options_spec,
)
__all__ = [
"DynamicRunnable",
"RunnableConfigurableFields",
"StrEnum",
"RunnableConfigurableAlternatives",
"make_opti... | langchain/libs/langchain/langchain/schema/runnable/configurable.py/0 | {
"file_path": "langchain/libs/langchain/langchain/schema/runnable/configurable.py",
"repo_id": "langchain",
"token_count": 133
} | 540 |
{
"feature_extractor_type": "Wav2Vec2FeatureExtractor",
"processor_class": "Wav2Vec2Processor"
} | transformers/tests/fixtures/preprocessor_config.json/0 | {
"file_path": "transformers/tests/fixtures/preprocessor_config.json",
"repo_id": "transformers",
"token_count": 41
} | 725 |
import os
from typing import Optional
import fsspec
from llama_index.core.storage.docstore.keyval_docstore import KVDocumentStore
from llama_index.core.storage.docstore.types import (
DEFAULT_BATCH_SIZE,
DEFAULT_PERSIST_DIR,
DEFAULT_PERSIST_FNAME,
DEFAULT_PERSIST_PATH,
)
from llama_index.core.storage.k... | llama_index/llama-index-core/llama_index/core/storage/docstore/simple_docstore.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/storage/docstore/simple_docstore.py",
"repo_id": "llama_index",
"token_count": 1352
} | 1,202 |
# MobileNet v3
**MobileNetV3** is a convolutional neural network that is designed for mobile phone CPUs. The network design includes the use of a [hard swish activation](https://paperswithcode.com/method/hard-swish) and [squeeze-and-excitation](https://paperswithcode.com/method/squeeze-and-excitation-block) modules in... | pytorch-image-models/docs/models/.templates/models/mobilenet-v3.md/0 | {
"file_path": "pytorch-image-models/docs/models/.templates/models/mobilenet-v3.md",
"repo_id": "pytorch-image-models",
"token_count": 1755
} | 317 |
// 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/core/src/common/EasyAssert.h/0 | {
"file_path": "milvus/internal/core/src/common/EasyAssert.h",
"repo_id": "milvus",
"token_count": 2354
} | 1,722 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.