repo_name stringlengths 1 62 | dataset stringclasses 1
value | lang stringclasses 11
values | pr_id int64 1 20.1k | owner stringlengths 2 34 | reviewer stringlengths 2 39 | diff_hunk stringlengths 15 262k | code_review_comment stringlengths 1 99.6k |
|---|---|---|---|---|---|---|---|
RepoRater | github_2023 | javascript | 89 | EddieHubCommunity | eddiejaoude | @@ -21,10 +21,23 @@ const sortOptions = [
export default function Page() {
const params = useSearchParams();
+ const router = useRouter();
const alert = params.get("alert");
const message = params.get("message");
const [keyword, setKeyword] = useState("");
const [sort, setSort] = useState(sortOptions... | This can go also
```suggestion
``` |
RepoRater | github_2023 | javascript | 89 | EddieHubCommunity | eddiejaoude | @@ -21,10 +21,23 @@ const sortOptions = [
export default function Page() {
const params = useSearchParams();
+ const router = useRouter();
const alert = params.get("alert");
const message = params.get("message");
const [keyword, setKeyword] = useState("");
const [sort, setSort] = useState(sortOptions... | ```suggestion
``` |
RepoRater | github_2023 | javascript | 89 | EddieHubCommunity | eddiejaoude | @@ -82,7 +95,7 @@ export default function Page() {
</aside>
</>
</SideNav>
- {alert && <Toast type={alert} message={message} />}
+ {showAlert && <Toast type={alert} message={message} />} | Then this becomes `alert`
```suggestion
{alert && <Toast type={alert} message={message} />}
``` |
RepoRater | github_2023 | javascript | 89 | EddieHubCommunity | eddiejaoude | @@ -21,11 +21,20 @@ const sortOptions = [
export default function Page() {
const params = useSearchParams();
+ const router = useRouter();
const alert = params.get("alert");
const message = params.get("message");
const [keyword, setKeyword] = useState("");
const [sort, setSort] = useState(sortOptions... | This now can be simplified also
```suggestion
setTimeout(() => router.push("/", { scroll: false }), 4000);
``` |
RepoRater | github_2023 | javascript | 54 | EddieHubCommunity | yogeshpaliyal | @@ -12,11 +12,29 @@ export default function Navbar() {
const alert = params.get("alert");
const message = params.get("message");
const [user, setUser] = useState(null);
+
+ const [isMobileMenuVisible, setIsMobileMenuVisible] = useState(false);
+
const logout = async () => {
await account.deleteSessi... | Please remove the console log |
RepoRater | github_2023 | others | 54 | EddieHubCommunity | yogeshpaliyal | @@ -1,3 +1,8 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
+
+
+body:has(.mobile-navbar) {
+ overflow: hidden;
+} | Add a blank line at end |
RepoRater | github_2023 | others | 62 | EddieHubCommunity | eddiejaoude | @@ -14,6 +14,7 @@
"appwrite": "^13.0.1",
"badge-maker": "^3.3.1",
"next": "14.0.4",
+ "next-transpile-modules": "^10.0.1", | What is this needed for? |
RepoRater | github_2023 | javascript | 62 | EddieHubCommunity | eddiejaoude | @@ -0,0 +1,39 @@
+"use client";
+import { useState } from 'react';
+//the searchBar functionality should be added.
+const SearchBar = ({ data }) => {
+ const [searchTerm, setSearchTerm] = useState('');
+
+ const [filteredData, setFilteredData] = useState(data || []);
+
+ const handleSearch = (e) => {
+ const te... | We should be using the search functionality in Appwrite
```
Query.search("text", "key words")
```
https://appwrite.io/docs/products/databases/queries |
RepoRater | github_2023 | javascript | 76 | EddieHubCommunity | eddiejaoude | @@ -45,7 +46,7 @@ export default function Navbar() {
<div className="navbar bg-base-100">
<div className="flex-1">
<div className="flex flex-row">
- <Image src={Logo} alt="RepoRater Logo" width={40} height={40} />
+ <Image src={Logo} alt="RepoRater Logo" width={40} heigh... | What about wrapping it in a `Link` component? |
RepoRater | github_2023 | others | 50 | EddieHubCommunity | eddiejaoude | @@ -34,3 +34,6 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
+
+# ignore env files
+.env | Good spot 👍 I think this could be added to the `env` section online 29 |
RepoRater | github_2023 | javascript | 47 | EddieHubCommunity | eddiejaoude | @@ -1,6 +1,25 @@
+"use client";
+
+import { useEffect } from "react";
import Form from "./Form";
+import { useRouter } from "next/navigation";
+import { account } from "@/config/appwrite-client";
export default function Rate() {
+ const router = useRouter();
+
+ const getUser = async () => {
+ try {
+ con... | Update quotes to be consistent with project
```suggestion
router.push("/auth/login");
``` |
RepoRater | github_2023 | others | 33 | EddieHubCommunity | eddiejaoude | @@ -3,7 +3,7 @@
<img width="458" alt="Screenshot 2023-12-13 at 09 27 37" src="https://github.com/EddieHubCommunity/RepoRater/assets/624760/ccc20975-4788-4232-b9e8-c3356b387b32">
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packa... | Thank you, this does not need to be a heading though
```suggestion
## Technologies used
- NextJS
- Appwrite
- DaisyUI
``` |
llm-on-ray | github_2023 | python | 275 | intel | KepingYan | @@ -71,13 +71,21 @@ def router_application(deployments, model_list, max_ongoing_requests):
return RouterDeployment.bind(merged_client)
-def openai_serve_run(deployments, model_list, host, route_prefix, port, max_ongoing_requests):
+def openai_serve_run(deployments, model_list, host, route_prefix, port, max_ong... | Since multiple models can be deployed at a time under http://localhost:8000/{route_prefix}/v1, we cannot iterate over model_list to get route_prefix and deployment_name. |
llm-on-ray | github_2023 | python | 275 | intel | KepingYan | @@ -131,6 +131,11 @@ def main(argv=None):
parser.add_argument(
"--max_batch_size", default=None, type=int, help="The max batch size for dynamic batching."
)
+ parser.add_argument(
+ "--new_deployment",
+ action="store_true",
+ help="Whether to override the previous deployment.... | Maybe we can add a parameter like "openai_route_prefix"(default is "/"), If users don't want to kill the previous deployments of multiple models, they can set a new route_prefix by this parameter for new added models. |
llm-on-ray | github_2023 | python | 275 | intel | KepingYan | @@ -152,6 +152,12 @@ def main(argv=None):
parser.add_argument(
"--max_batch_size", default=None, type=int, help="The max batch size for dynamic batching."
)
+ parser.add_argument(
+ "--openai_route_prefix",
+ default=None,
+ type=str,
+ help="Whether to use default '/' ... | Let's set the default value as '/' here. As ray will check the route_prefix value https://github.com/ray-project/ray/blob/a0deb6b40cb4149d9a59db6df1bedb7402b09056/python/ray/serve/api.py#L473-L476 , we can add this instruction `The openai_route_prefix must start with a forward slash ('/')` in help string to prompt user... |
llm-on-ray | github_2023 | python | 275 | intel | KepingYan | @@ -179,15 +185,25 @@ def main(argv=None):
host = "127.0.0.1" if args.serve_local_only else "0.0.0.0"
print("Service is running with deployments:" + str(deployments))
print("Service is running models:" + str(model_list))
- openai_serve_run(
- deployments,
- model_... | Then we don't need this judgment, just pass in the parameter `openai_route_prefix` |
llm-on-ray | github_2023 | python | 243 | intel | xwu99 | @@ -75,8 +75,35 @@
json=sample_input,
stream=args.streaming_response,
)
+try: | I don't' think we can add the debug info in the examples code since they are for users.
Could you add the check from CI script? or figure out a way to print this from the serve side. |
llm-on-ray | github_2023 | others | 219 | intel | xwu99 | @@ -102,6 +102,32 @@ After deploying the model endpoint, you can access and test it by using the scri
python examples/inference/api_server_simple/query_single.py --model_endpoint http://127.0.0.1:8000/gpt2
```
+## Getting Started With Docker
+This guide will assist you in setting up LLM-on-Ray on With Docker.
+
+##... | It don't think we need to prune containers for users. it's up to them. |
llm-on-ray | github_2023 | others | 219 | intel | xwu99 | @@ -33,7 +33,7 @@ LLM-on-Ray's modular workflow structure is designed to comprehensively cater to

-## Getting Started
+## Getting Started With Source code | ```suggestion
## Getting Started Locally With Source code
``` |
llm-on-ray | github_2023 | others | 219 | intel | xwu99 | @@ -102,6 +102,32 @@ After deploying the model endpoint, you can access and test it by using the scri
python examples/inference/api_server_simple/query_single.py --model_endpoint http://127.0.0.1:8000/gpt2
```
+## Getting Started With Docker
+This guide will assist you in setting up LLM-on-Ray on With Docker.
+
+##... | ```suggestion
#### 1. Build Docker Image
``` |
llm-on-ray | github_2023 | others | 219 | intel | xwu99 | @@ -102,6 +102,32 @@ After deploying the model endpoint, you can access and test it by using the scri
python examples/inference/api_server_simple/query_single.py --model_endpoint http://127.0.0.1:8000/gpt2
```
+## Getting Started With Docker
+This guide will assist you in setting up LLM-on-Ray on With Docker.
+
+##... | this script is inside the container, right? It's better to not to use a relative path. You can consider add all the scripts to PATH and call them directly |
llm-on-ray | github_2023 | others | 219 | intel | xwu99 | @@ -102,6 +102,32 @@ After deploying the model endpoint, you can access and test it by using the scri
python examples/inference/api_server_simple/query_single.py --model_endpoint http://127.0.0.1:8000/gpt2
```
+## Getting Started With Docker
+This guide will assist you in setting up LLM-on-Ray on With Docker.
+
+##... | should specify a specific command line which user can use directly. |
llm-on-ray | github_2023 | others | 219 | intel | xwu99 | @@ -0,0 +1,60 @@
+#!/usr/bin/env bash
+set -eo pipefail
+
+##Set Your proxy and cache path here
+HTTP_PROXY='http://10.24.221.169:911' | it's better to check if the env is defined, otherwise set a default value. you can use VARIABLE="${VARIABLE:-value}", in this way users can define their own env.
Need to document all the envs.
|
llm-on-ray | github_2023 | others | 219 | intel | xwu99 | @@ -0,0 +1,60 @@
+#!/usr/bin/env bash
+set -eo pipefail
+
+##Set Your proxy and cache path here
+HTTP_PROXY='http://10.24.221.169:911'
+HTTPS_PROXY='http://10.24.221.169:911' | suggest to not set this proxy by default for user, but we can use this env in our own CI. |
llm-on-ray | github_2023 | others | 219 | intel | xwu99 | @@ -102,6 +102,32 @@ After deploying the model endpoint, you can access and test it by using the scri
python examples/inference/api_server_simple/query_single.py --model_endpoint http://127.0.0.1:8000/gpt2
```
+## Getting Started With Docker
+This guide will assist you in setting up LLM-on-Ray on With Docker.
+
+##... | We should move all CI-only Dockerfile in dev/docker/* and move them to a separate directory (e.g. dev/docker/ci). Leaving this directory for scripts can be used for both users and CI.
Need a description in doc that each dockerfile is for what purpose. There is a README.md in dev/docker. need to revise that as well. |
llm-on-ray | github_2023 | others | 219 | intel | xwu99 | @@ -1 +1,8 @@
-Dockerfiles for CI tests. There could be one Dockerfile with ARG declared to distinguish different pip extras. However, ARG will bust cache of 'pip install', which usually takes long time, when build docker image. Instead, we have two almost identical Dockerfiles here to improve CI efficiency.
+Dockerfi... | there is no Dockerfile.habana in the docker directory.
```suggestion
2.Dockerfile.habana for user to build llm-on-ray with docker on Intel Habana Gaudi.
``` |
llm-on-ray | github_2023 | others | 219 | intel | xwu99 | @@ -0,0 +1,32 @@
+#!/bin/bash
+set -e
+
+# Check if an environment variable exists and print its value
+if [ -n "$hf_token" ]; then
+ echo "The hf_token environment variable is: $hf_token" | should be HF_TOKEN ? |
llm-on-ray | github_2023 | others | 225 | intel | carsonwang | @@ -0,0 +1,13 @@
+port: 8000
+name: MindChat-Qwen2-4B
+route_prefix: /MindChat-Qwen2-4B
+num_replicas: 1
+cpus_per_worker: 8
+hpus_per_worker: 1
+device: hpu
+model_description:
+ model_id_or_path: X-D-Lab/MindChat-Qwen2-4B | Not this one. Please use Qwen/Qwen1.5-7B |
llm-on-ray | github_2023 | others | 225 | intel | carsonwang | @@ -0,0 +1,13 @@
+port: 8000
+name: CodeLlama-7b-hf
+route_prefix: /CodeLlama-7b-hf
+num_replicas: 1
+cpus_per_worker: 8
+hpus_per_worker: 1
+device: hpu
+model_description:
+ model_id_or_path: codellama/CodeLlama-7b-hf
+ tokenizer_name_or_path: codellama/CodeLlama-7b-hf
+ chat_processor: ChatModelGptJ | This config file is not correct. Please refer to the existing yaml file for CPU. |
llm-on-ray | github_2023 | others | 225 | intel | carsonwang | @@ -0,0 +1,14 @@
+port: 8000 | Please remove this file. |
llm-on-ray | github_2023 | others | 225 | intel | carsonwang | @@ -0,0 +1,12 @@
+port: 8000 | Please also remove this file. |
llm-on-ray | github_2023 | python | 264 | intel | xwu99 | @@ -0,0 +1,174 @@
+# extension for integrate with neural-speed
+import importlib
+from typing import Optional
+import os
+
+from vllm.model_executor.layers.quantization.base_config import QuantizationConfig
+from vllm.model_executor.model_loader.weight_utils import get_quant_config
+
+from vllm.logger import init_logge... |
```suggestion
if self.quantization == "ns":
``` |
llm-on-ray | github_2023 | others | 264 | intel | xwu99 | @@ -0,0 +1,134 @@
+# Copyright (c) 2023 Intel Corporation
+#
+# 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... | Do we build AVX512 by default? I am not sure the usage of the option here. How could we check if AVX512 build is enabled? |
llm-on-ray | github_2023 | python | 264 | intel | xwu99 | @@ -0,0 +1,174 @@
+# extension for integrate with neural-speed
+import importlib
+from typing import Optional
+import os
+
+from vllm.model_executor.layers.quantization.base_config import QuantizationConfig
+from vllm.model_executor.model_loader.weight_utils import get_quant_config
+
+from vllm.logger import init_logge... | Do you mind summarize a table of which properties are monkey-patched with related NS classes in the PR description for better understanding? |
llm-on-ray | github_2023 | python | 264 | intel | xwu99 | @@ -43,15 +49,44 @@ def __init__(self, infer_conf: InferenceConfig, max_num_seqs):
# The default value is 40GB.
os.environ["VLLM_CPU_KVCACHE_SPACE"] = str(self.VLLM_CPU_KVCACHE_SPACE_DEFAULT)
- args = AsyncEngineArgs(
- model=model_desc.model_id_or_path,
- trust_remote_c... | there are several places of this one
```suggestion
from vllm.extension import ns |
llm-on-ray | github_2023 | python | 264 | intel | xwu99 | @@ -0,0 +1,324 @@
+#
+# Copyright 2023 The LLM-on-Ray Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required b... | consider set the cores for ns according to `cpus_per_worker` in the inference config, all other predictors use this config to consistently assign cpu resources. |
llm-on-ray | github_2023 | python | 264 | intel | xwu99 | @@ -0,0 +1,324 @@
+#
+# Copyright 2023 The LLM-on-Ray Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required b... | you can directly use `cpus_per_worker` to set cpu cores for ns, no need to set cpus_per_worker to 1 and use another env for ns. see below. |
llm-on-ray | github_2023 | python | 252 | intel | harborn | @@ -0,0 +1,224 @@
+#
+# Copyright 2023 The LLM-on-Ray Authors. | rename this file: data_preprocess.py |
llm-on-ray | github_2023 | python | 252 | intel | harborn | @@ -37,10 +40,12 @@
from pydantic_yaml import parse_yaml_raw_as
from llm_on_ray import common
-from llm_on_ray.finetune import template
+from llm_on_ray.finetune.DataPreprocess import AlpacaDataPreprocess
from llm_on_ray.finetune.finetune_config import FinetuneConfig
from importlib import util
+IGNORE_INDEX = -... | seems this variable not used |
llm-on-ray | github_2023 | python | 252 | intel | harborn | @@ -0,0 +1,224 @@
+#
+# Copyright 2023 The LLM-on-Ray Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required b... | does this class only used for preprocessing alpaca dataset? |
llm-on-ray | github_2023 | python | 252 | intel | harborn | @@ -0,0 +1,224 @@
+#
+# Copyright 2023 The LLM-on-Ray Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required b... | rename this function:
`def tokenize` |
llm-on-ray | github_2023 | python | 252 | intel | harborn | @@ -0,0 +1,224 @@
+#
+# Copyright 2023 The LLM-on-Ray Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required b... | pass config here:
`def __init__(self, config):` |
llm-on-ray | github_2023 | python | 252 | intel | harborn | @@ -0,0 +1,224 @@
+#
+# Copyright 2023 The LLM-on-Ray Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required b... | not pass config in this function, pass config in class construction |
llm-on-ray | github_2023 | python | 252 | intel | harborn | @@ -0,0 +1,224 @@
+#
+# Copyright 2023 The LLM-on-Ray Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required b... | this function is not clear too much compared with `preprocess_function_with_tokenize`
will get confused from function name |
llm-on-ray | github_2023 | python | 252 | intel | harborn | @@ -0,0 +1,229 @@
+#
+# Copyright 2023 The LLM-on-Ray Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required b... | class name should be nouns, not verbs.
so renamed as `DataProcessor` |
llm-on-ray | github_2023 | python | 252 | intel | harborn | @@ -195,50 +203,22 @@ def local_load(name, **load_config):
def tokenize_dataset(config: Dict, tokenizer, dataset):
- max_length = config["Dataset"].get("max_length", 512)
group = config["Dataset"].get("group", True)
block_size = config["Dataset"].get("block_size", 512)
tokenizer.pad_token = token... | object name should be nouns, not verbs.
so renamed as `preprocessor` |
llm-on-ray | github_2023 | python | 252 | intel | harborn | @@ -0,0 +1,229 @@
+#
+# Copyright 2023 The LLM-on-Ray Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required b... | `def make_prompt`
And I think should make this function as a global function, not a sub function of this class |
llm-on-ray | github_2023 | python | 252 | intel | harborn | @@ -0,0 +1,225 @@
+#
+# Copyright 2023 The LLM-on-Ray Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required b... | this function do nothing, just provide a sub function.
so I think you should put following variable to class's `__init__` function, and provide following two functions:
1. `def tokenize_by_nerual_chat(examples):`
2. `def tokenize(examples):` |
llm-on-ray | github_2023 | others | 253 | intel | carsonwang | @@ -15,7 +15,7 @@ ipex:
enabled: false
precision: bf16
model_description:
- model_id_or_path: meta-llama/Llama-2-7b-chat-hf
- tokenizer_name_or_path: meta-llama/Llama-2-7b-chat-hf
+ model_id_or_path: NousResearch/Llama-2-7b-chat-hf | can you revert all the changes for yamls in inference/models and still use meta-llama? |
llm-on-ray | github_2023 | python | 221 | intel | xwu99 | @@ -130,6 +139,13 @@ def main(argv=None):
args = parser.parse_args(argv)
+ all_models_name = list(all_models.keys())
+ if args.list_model_ids:
+ for model in all_models_name:
+ print(model)
+ print("config_file_path:" + "llm_on_ray/inference/models/" + model + ".yaml") | Could you print model id and config file path in the same line? you can use a f-string.
```suggestion
print(f"{model}: \tllm_on_ray/inference/models/{model}.yaml")
```
and the model yaml filename is not always equal to the model-id right? You need to fetch the real path of the file?
|
llm-on-ray | github_2023 | python | 221 | intel | xwu99 | @@ -20,20 +20,22 @@
# Parametrize the test function with different combinations of parameters
@pytest.mark.parametrize(
- "config_file, models, port, simple, keep_serve_termimal",
+ "config_file, models, port, simple, keep_serve_termimal,list_model_ids", | pay attention to the style
```suggestion
"config_file, models, port, simple, keep_serve_termimal, list_model_ids",
``` |
llm-on-ray | github_2023 | python | 221 | intel | xwu99 | @@ -42,25 +44,35 @@ def test_script(
port,
simple,
keep_serve_termimal,
+ list_model_ids,
):
- cmd_serve = ["python", "../llm_on_ray/inference/serve.py"]
- if config_file is not None:
- cmd_serve.append("--config_file")
- cmd_serve.append(str(config_file))
- if models is not No... | why we need to check gpt2 if only model ids are listed? |
llm-on-ray | github_2023 | others | 195 | intel | xwu99 | @@ -0,0 +1,168 @@
+#! /bin/bash
+set -e | ```suggestion
set -eo pipefail
``` |
llm-on-ray | github_2023 | python | 195 | intel | xwu99 | @@ -0,0 +1,193 @@
+import argparse
+import matplotlib.pyplot as plt
+import string
+import re
+
+marks = {}
+marks["bs_mark"] = r"bs:"
+marks["iter_mark"] = r"iter:"
+marks["input_tokens_length_mark"] = r"input_tokens_length:"
+marks["prompts_num_mark"] = r"num_prompts:"
+marks["total_time_mark"] = r"Total time:"
+mark... | pls use llm-on-ray
choice should be a list so that use can choose multiple charts to generate. by default it should generate all charts. |
llm-on-ray | github_2023 | python | 195 | intel | xwu99 | @@ -0,0 +1,193 @@
+import argparse
+import matplotlib.pyplot as plt
+import string
+import re
+
+marks = {}
+marks["bs_mark"] = r"bs:"
+marks["iter_mark"] = r"iter:"
+marks["input_tokens_length_mark"] = r"input_tokens_length:"
+marks["prompts_num_mark"] = r"num_prompts:"
+marks["total_time_mark"] = r"Total time:"
+mark... | The problem of parsing from pure text output is it's not very flexible and error-prone. Also the parsing code is harder for maintanance.
It's better to output json/csv format for results then data analytics libs such as pandas can be used. benchmark_serving already able to output results to some dir, just need to speci... |
llm-on-ray | github_2023 | others | 195 | intel | xwu99 | @@ -0,0 +1,168 @@
+#! /bin/bash
+set -e
+
+OMP_NUM_THREADS=24 # need to be modified based on cpus_per_worker
+VALUE_INF=2000
+choice=${1}
+
+get_peak_throughpt(){
+ bs=${1}
+ num_prompts=${2}
+ log_path=${3}
+ if [ -f $log_path ]; then
+ rm $log_path
+ fi
+ for vllm_bs in ${bs[*]};
+ do
+ ... | Could we use a const variable define for all the paths? |
llm-on-ray | github_2023 | others | 195 | intel | xwu99 | @@ -0,0 +1,168 @@
+#! /bin/bash
+set -e
+
+OMP_NUM_THREADS=24 # need to be modified based on cpus_per_worker
+VALUE_INF=2000
+choice=${1}
+
+get_peak_throughpt(){
+ bs=${1}
+ num_prompts=${2}
+ log_path=${3}
+ if [ -f $log_path ]; then
+ rm $log_path
+ fi
+ for vllm_bs in ${bs[*]};
+ do
+ ... | could we use a const define for 1000 here. it's hard to tell what is 1000 here. |
llm-on-ray | github_2023 | others | 195 | intel | xwu99 | @@ -0,0 +1,168 @@
+#! /bin/bash
+set -e
+
+OMP_NUM_THREADS=24 # need to be modified based on cpus_per_worker
+VALUE_INF=2000
+choice=${1}
+
+get_peak_throughpt(){ | Could we print out the key paramaters before the run so that people can know what is running ? |
llm-on-ray | github_2023 | others | 195 | intel | xwu99 | @@ -0,0 +1,168 @@
+#! /bin/bash
+set -e
+
+OMP_NUM_THREADS=24 # need to be modified based on cpus_per_worker
+VALUE_INF=2000
+choice=${1}
+
+get_peak_throughpt(){
+ bs=${1}
+ num_prompts=${2}
+ log_path=${3}
+ if [ -f $log_path ]; then
+ rm $log_path
+ fi
+ for vllm_bs in ${bs[*]};
+ do
+ ... | use LLM-on-Ray or llm-on-ray |
llm-on-ray | github_2023 | others | 195 | intel | xwu99 | @@ -0,0 +1,168 @@
+#! /bin/bash
+set -e
+
+OMP_NUM_THREADS=24 # need to be modified based on cpus_per_worker
+VALUE_INF=2000
+choice=${1}
+
+get_peak_throughpt(){
+ bs=${1}
+ num_prompts=${2}
+ log_path=${3}
+ if [ -f $log_path ]; then
+ rm $log_path
+ fi
+ for vllm_bs in ${bs[*]};
+ do
+ ... | could we define numactl -N 0 -m 0 -C 0-$(($OMP_NUM_THREADS-1)) to some variable so that don't need to duplicate this line again and again. |
llm-on-ray | github_2023 | others | 195 | intel | xwu99 | @@ -0,0 +1,168 @@
+#! /bin/bash
+set -e
+
+OMP_NUM_THREADS=24 # need to be modified based on cpus_per_worker
+VALUE_INF=2000
+choice=${1}
+
+get_peak_throughpt(){
+ bs=${1}
+ num_prompts=${2}
+ log_path=${3}
+ if [ -f $log_path ]; then
+ rm $log_path
+ fi
+ for vllm_bs in ${bs[*]};
+ do
+ ... | * No need to define extra OMP_NUM_THREADS as we already supported this argument inside the code. This makes an impression that user need to define the env before use. We need to make sure everything we added is useful and there is no redundant options adding to the command line.
* serve is just a job submitter. We need... |
llm-on-ray | github_2023 | others | 195 | intel | xwu99 | @@ -0,0 +1,168 @@
+#! /bin/bash
+set -e
+
+OMP_NUM_THREADS=24 # need to be modified based on cpus_per_worker
+VALUE_INF=2000
+choice=${1}
+
+get_peak_throughpt(){
+ bs=${1}
+ num_prompts=${2}
+ log_path=${3}
+ if [ -f $log_path ]; then
+ rm $log_path
+ fi
+ for vllm_bs in ${bs[*]};
+ do
+ ... | Add some docs for what does it do and how to use for each defined functions. |
llm-on-ray | github_2023 | others | 195 | intel | xwu99 | @@ -0,0 +1,48 @@
+The `benchmark_visualize.py` script is designed for visualizing benchmark results and generate figures. The performance data it uses comes from the results generated by `run_benchmark.sh`. Two modes are supported when generating performance data, namely "test" and "benchmark". "test" only selects a sm... | should link to llm-on-ray repo |
llm-on-ray | github_2023 | others | 195 | intel | xwu99 | @@ -0,0 +1,222 @@
+#! /bin/bash
+set -eo pipefail
+
+choice=${1}
+run_mode=${2} # "test" or "benchmark", where "test" will only use a small part of the dataset
+VALUE_INF=2000 | it looks like the naming style is a mix. could you change all constants to all CAPITAL? |
llm-on-ray | github_2023 | others | 195 | intel | xwu99 | @@ -0,0 +1,222 @@
+#! /bin/bash
+set -eo pipefail
+
+choice=${1} | Could you print out Usage help messages when user doesn't provide any parameters? |
llm-on-ray | github_2023 | others | 214 | intel | carsonwang | @@ -0,0 +1,36 @@
+port: 8000
+name: llama-2-7b-chat-hf
+route_prefix: /llama-2-7b-chat-hf
+max_concurrent_queries: 64
+autoscaling_config:
+ min_replicas: 1
+ initial_replicas: 1
+ max_replicas: 2
+ target_ongoing_requests: 24
+ downscale_delay_s: 30
+ upscale_delay_s: 10
+cpus_per_worker: 24
+gpus_pe... | Remove this and the prompt to use chat template. |
llm-on-ray | github_2023 | python | 214 | intel | carsonwang | @@ -132,12 +133,29 @@ def _check_perftype(cls, v: str):
return v
+class AutoscalingConfig(BaseModel):
+ min_replicas: int = 1
+ initial_replicas: int = 1
+ max_replicas: int = 1
+ target_ongoing_requests: float = 1.0
+ metrics_interval_s: float = 10.0
+ look_back_period_s: float = 30.0
+ ... | Can we also update this to max_ongoing_requests to align with Ray's new naming? |
llm-on-ray | github_2023 | others | 214 | intel | carsonwang | @@ -0,0 +1,36 @@
+port: 8000
+name: llama-2-7b-chat-hf
+route_prefix: /llama-2-7b-chat-hf
+max_concurrent_queries: 64
+autoscaling_config:
+ min_replicas: 1
+ initial_replicas: 1
+ max_replicas: 2
+ target_ongoing_requests: 24
+ downscale_delay_s: 30
+ upscale_delay_s: 10
+cpus_per_worker: 24
+gpus_pe... | Can we just name this `max_num_seqs` because it is already under vllm? |
llm-on-ray | github_2023 | python | 214 | intel | carsonwang | @@ -132,12 +133,29 @@ def _check_perftype(cls, v: str):
return v
+class AutoscalingConfig(BaseModel):
+ min_replicas: int = 1
+ initial_replicas: int = 1
+ max_replicas: int = 1
+ target_ongoing_requests: float = 1.0
+ metrics_interval_s: float = 10.0
+ look_back_period_s: float = 30.0
+ ... | These two have been deprecated. Can we also remove them? |
llm-on-ray | github_2023 | python | 233 | intel | minmingzhu | @@ -190,6 +110,75 @@ def convert_dtype(dtype: str) -> Optional[torch.dtype]:
return supported_dtypes[dtype]
+def load_tokenizer(config: Dict):
+ name = config.get("name")
+ load_config = config.get("config", {})
+ tokenizer = transformers.AutoTokenizer.from_pretrained(name, **load_config)
+ return ... | In my opinion, the validation_split_percentage parameter from the Hugging Face dataset library is a useful feature for splitting the validation dataset. During my development of DPO, I utilized this parameter to split the validation data from the original dataset. This method ensures a straightforward and consistent wa... |
llm-on-ray | github_2023 | others | 233 | intel | carsonwang | @@ -10,6 +10,7 @@ The following are the parameters supported in the finetuning workflow.
|tokenizer_name|None|Path to pretrained tokenizer from huggingface.co/models. If not provided, the tokenizer will be loaded from the `base_model`.|
|gpt_base_model|True|This parameter is for [Transformers#22482](https://github.co... | can you please list the supported options? Can you also show the picture for one of your runs? |
llm-on-ray | github_2023 | python | 233 | intel | carsonwang | @@ -21,10 +21,15 @@
import sys
from typing import Any, Dict, Union, Optional
-import torch
+from itertools import chain
+import torch
+import datasets
import transformers
+from peft import get_peft_model, LoraConfig
+import deltatuner | I think we can remove deltatuner. It is not maintained. But we can do in a separate PR. |
llm-on-ray | github_2023 | python | 227 | intel | harborn | @@ -271,13 +273,20 @@ def train_func(config: Dict[str, Any]):
elif device in ["hpu"]:
from optimum.habana.transformers import GaudiTrainer
from optimum.habana.transformers import GaudiTrainingArguments
+ from optimum.habana import GaudiConfig
+ gaudi_config = GaudiConfig()
+ ... | Maybe should add a option in yaml config to use fused_adam on HPU fine-tuning.
fused_adam is provided in optimum-habana, this is only for HPU fine-tuning. |
llm-on-ray | github_2023 | python | 226 | intel | kira-lin | @@ -176,7 +176,7 @@ def _process_config(self, config):
config["lazy_mode"] = self.use_lazy_mode
config["hpu_graphs"] = self.use_hpu_graphs
# max_new_tokens is required for hpu
- if "max_new_tokens" not in config:
+ if config.get("max_new_tokens") is None: | ```suggestion
if config.get("max_new_tokens", None) is None:
``` |
llm-on-ray | github_2023 | python | 199 | intel | KepingYan | @@ -112,6 +112,27 @@ class ModelDescription(BaseModel):
input_processor: str = "AutoProcessor"
model_loader: str = "AutoModel"
+ chat_model_with_image: bool = False
+ chat_template: Union[str, None] = None
+ default_chat_template: str = (
+ "Below is an instruction that describes a task. Wri... | Do we need to set a default chat template? Is it better to load the model's default chat template? If a model does not have chat template, we also set it to None by default. |
llm-on-ray | github_2023 | others | 199 | intel | KepingYan | @@ -13,15 +13,5 @@ ipex:
model_description:
model_id_or_path: adept/fuyu-8b
tokenizer_name_or_path: adept/fuyu-8b
- chat_processor: ChatModelwithImage
- input_processor: FuyuProcessor
- model_loader: FuyuForCausalLM
- prompt:
- intro: ''
- human_id: '[INST] {msg} [/INST]
-
- '
- bot_id: ''
- ... | I'm not sure if this format is difficult for users to understand and configure. Is there a way to simplify this setup? |
llm-on-ray | github_2023 | others | 199 | intel | KepingYan | @@ -14,17 +14,4 @@ ipex:
model_description:
model_id_or_path: EleutherAI/gpt-j-6b
tokenizer_name_or_path: EleutherAI/gpt-j-6b
- chat_processor: ChatModelGptJ
gpt_base_model: true
- prompt:
- intro: 'Below is an instruction that describes a task. Write a response that appropriately
- completes the re... | Does gpt-j-6b have a default chat template in transformers? If not, please add chat_template key for it. This is also required for other models' configuration file. |
llm-on-ray | github_2023 | python | 199 | intel | KepingYan | @@ -408,9 +391,14 @@ async def openai_call(
tool_choice=None,
):
self.use_openai = True
-
+ print("openai_call")
+ print(input)
+ print(type(input))
# return prompt or list of prompts preprocessed
prompts = self.preprocess_prompts(input, tools, tool_choice)
... | Please remove debug output. |
llm-on-ray | github_2023 | python | 199 | intel | carsonwang | @@ -0,0 +1,87 @@
+#
+# Copyright 2023 The LLM-on-Ray Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by... | This comment doesn't look correct? |
llm-on-ray | github_2023 | python | 199 | intel | carsonwang | @@ -0,0 +1,87 @@
+#
+# Copyright 2023 The LLM-on-Ray Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by... | In the above code, data from `url` by has already been extracted by `"content": message["content"][1]["image_url"]["url"]`, so there is no content["url"] any more. The earlier code should use `"content": message["content"][1]["image_url"]`? We should have tests to cover the functions in this file. Please create an issu... |
llm-on-ray | github_2023 | python | 199 | intel | carsonwang | @@ -0,0 +1,87 @@
+#
+# Copyright 2023 The LLM-on-Ray Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by... | This line will also run if is_mllm is true, which is not needed. You can put it in an `else`. |
llm-on-ray | github_2023 | python | 199 | intel | carsonwang | @@ -0,0 +1,87 @@
+#
+# Copyright 2023 The LLM-on-Ray Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by... | You don't need to check if it is a list because `def get_prompt(self, input: List, is_mllm=False):` means it is always a list. |
llm-on-ray | github_2023 | others | 199 | intel | carsonwang | @@ -12,10 +12,5 @@ ipex:
model_description:
model_id_or_path: gpt2
tokenizer_name_or_path: gpt2
- chat_processor: ChatModelGptJ
gpt_base_model: true
- prompt:
- intro: ''
- human_id: ''
- bot_id: ''
- stop_words: []
+ chat_template: "{% if messages[0]['role'] == 'system' %}{% set loop_messages ... | Why do we need add this? Does the default chat template work? |
llm-on-ray | github_2023 | python | 199 | intel | carsonwang | @@ -112,6 +112,27 @@ class ModelDescription(BaseModel):
input_processor: str = "AutoProcessor"
model_loader: str = "AutoModel"
+ chat_model_with_image: bool = False
+ chat_template: Union[str, None] = None
+ default_chat_template: str = ( | Can you add a test for this default chat template to make sure the output is expected. |
llm-on-ray | github_2023 | others | 199 | intel | carsonwang | @@ -13,13 +13,4 @@ ipex:
model_description:
model_id_or_path: Intel/neural-chat-7b-v3-1
tokenizer_name_or_path: Intel/neural-chat-7b-v3-1
- chat_processor: ChatModelGptJ
- prompt:
- intro: '### System:
- You are a chatbot developed by Intel. Please answer all questions to the best of your ability.'
- ... | Should this `### System: You are ...` be included in the messages instead of in the template? The template should convert the system message to the correct format. |
llm-on-ray | github_2023 | python | 199 | intel | carsonwang | @@ -112,6 +112,27 @@ class ModelDescription(BaseModel):
input_processor: str = "AutoProcessor"
model_loader: str = "AutoModel"
+ chat_model_with_image: bool = False
+ chat_template: Union[str, None] = None
+ default_chat_template: str = (
+ "Below is an instruction that describes a task. Wri... | This is like a system message, similarly, should it be part of the messages instead of in the template? |
llm-on-ray | github_2023 | others | 199 | intel | xwu99 | @@ -13,9 +13,4 @@ ipex:
model_description:
model_id_or_path: codellama/CodeLlama-7b-hf
tokenizer_name_or_path: codellama/CodeLlama-7b-hf
- chat_processor: ChatModelGptJ
- prompt:
- intro: ''
- human_id: ''
- bot_id: ''
- stop_words: []
+ chat_template: "llm_on_ray/common/templates/template_gpt2.ji... | why using template_gpt2.jinja for CodeLlama? |
llm-on-ray | github_2023 | python | 199 | intel | xwu99 | @@ -0,0 +1,187 @@
+#
+# Copyright 2023 The LLM-on-Ray Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required b... | I don't think you need to duplicate code here, you just need function to input a name and output a path. |
llm-on-ray | github_2023 | others | 199 | intel | xwu99 | @@ -13,9 +13,4 @@ ipex:
model_description:
model_id_or_path: codellama/CodeLlama-7b-hf
tokenizer_name_or_path: codellama/CodeLlama-7b-hf
- chat_processor: ChatModelGptJ
- prompt:
- intro: ''
- human_id: ''
- bot_id: ''
- stop_words: []
+ chat_template: "llm_on_ray/common/templates/template_codella... | We may need to use a relative path the current yaml file, otherwise it's hard for user to specify the file since they may put the template files elsewhere.
|
llm-on-ray | github_2023 | others | 199 | intel | xwu99 | @@ -33,7 +33,7 @@ curl $ENDPOINT_URL/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "gpt2",
- "messages": [{"role": "assistant", "content": "You are a helpful assistant."}, {"role": "user", "content": "Hello!"}],
+ "messages": [{"role": "user", "content": "Hello!"}], | Are the previous messages a chat sequence? why changed? |
llm-on-ray | github_2023 | python | 199 | intel | xwu99 | @@ -0,0 +1,86 @@
+#
+# Copyright 2023 The LLM-on-Ray Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by... | parse_jinja_file function has problems, it may not return anything here |
llm-on-ray | github_2023 | python | 199 | intel | xwu99 | @@ -194,3 +195,15 @@ def module_import_and_init(module_name, clazz, **clazzs_kwargs):
module = importlib.import_module(module_name)
class_ = getattr(module, clazz)
return class_(**clazzs_kwargs)
+
+
+def parse_jinja_file(chat_template: str): | should be Optional[str] as you are checking None below, right? And should it return something if chat_template is None ? |
llm-on-ray | github_2023 | python | 199 | intel | xwu99 | @@ -0,0 +1,86 @@
+#
+# Copyright 2023 The LLM-on-Ray Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by... | what does dict represent here? is it different from ChatMessage? |
llm-on-ray | github_2023 | others | 199 | intel | xwu99 | @@ -22,11 +22,6 @@ model_description:
peft_model_id_or_path: null
peft_type: null
use_hpu_graphs: true
- prompt: | Add chat template config in this yaml template? |
llm-on-ray | github_2023 | python | 209 | intel | kira-lin | @@ -179,8 +185,17 @@ def get_streamer(self):
self.tokenizer, skip_prompt=True, timeout=0, skip_special_tokens=True
)
- def generate(self, prompt, **config):
+ # FIXME: support MultiplePromptInput and MllmPromptInput
+ def generate(self, input: GenerateInput, **config) -> Generat... | ```suggestion
if isinstance(input, MllmPromptInput):
raise TypeError(
"HPUPredictor doesn't support MLLM prompts for now!"
)
``` |
llm-on-ray | github_2023 | python | 209 | intel | kira-lin | @@ -179,8 +185,17 @@ def get_streamer(self):
self.tokenizer, skip_prompt=True, timeout=0, skip_special_tokens=True
)
- def generate(self, prompt, **config):
+ # FIXME: support MultiplePromptInput and MllmPromptInput | ```suggestion
# FIXME: support MllmPromptInput
``` |
llm-on-ray | github_2023 | python | 209 | intel | kira-lin | @@ -57,9 +58,14 @@
)
from llm_on_ray.inference.inference_config import (
InferenceConfig,
- GenerateResult,
+ ModelGenerateResult,
+)
+from llm_on_ray.inference.predictor import (
+ GenerateInput,
+ GenerateOutput,
+ Predictor,
+ SinglePromptInput, | ```suggestion
SinglePromptInput,
MultiplePromptInput,
MllmPromptInput,
``` |
llm-on-ray | github_2023 | python | 209 | intel | KepingYan | @@ -102,33 +112,28 @@ def streaming_generate(self, prompt, streamer, **config):
**config,
)
- def generate(
- self, prompts: Union[str, List[str]], **config
- ) -> Union[GenerateResult, List[GenerateResult], None]:
+ def generate(self, input: GenerateInput, **config) -> GenerateO... | Should it be ‘input’ here? Because prompts always is a List here. |
llm-on-ray | github_2023 | python | 209 | intel | kira-lin | @@ -89,32 +94,37 @@ def _process_config(self, config):
# lazy mode should be True when using hpu graphs
config["lazy_mode"] = True
- def _tokenize_inputs(self, image, text_prompt):
- input_tokens = self.processor(text=text_prompt, images=image, return_tensors="pt")
+ def... | ```suggestion
raise TypeError("MllmPredictor should use (prompt, image) as input.")
``` |
llm-on-ray | github_2023 | python | 204 | intel | minmingzhu | @@ -193,92 +242,43 @@ def train_func(config: Dict[str, Any]):
}
)
- optimizer = common.optimizer.Optimizer.registory.get("DefaultOptimizer")()(
- model,
- config={
- "name": config["Training"]["optimizer"],
- "config": {"lr": config["Training"]["learning_rate"]},
-... | Does remove prepare function in default_trainer.py? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.