This repository was archived by the owner on Sep 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 8 files changed +55
-1
lines changed
android/Torchchat/app/src/test/java/org/pytorch/torchchat
unsupported/llama2.c/runner-et Expand file tree Collapse file tree 8 files changed +55
-1
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3+ * All rights reserved.
4+ *
5+ * This source code is licensed under the BSD-style license found in the
6+ * LICENSE file in the root directory of this source tree.
7+ */
8+
19package org .pytorch .torchchat ;
210
311import org .junit .Test ;
Original file line number Diff line number Diff line change 1+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2+ # All rights reserved.
3+
4+ # This source code is licensed under the license found in the
5+ # LICENSE file in the root directory of this source tree.
6+
17import subprocess
28import sys
39
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Copyright (c) Meta Platforms, Inc. and affiliates.
3+ # All rights reserved.
4+ #
5+ # This source code is licensed under the BSD-style license found in the
6+ # LICENSE file in the root directory of this source tree.
7+
18cmake_minimum_required(VERSION 3.24)
29set(CMAKE_CXX_STANDARD 17)
310IF(DEFINED ENV{TORCHCHAT_ROOT})
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Copyright (c) Meta Platforms, Inc. and affiliates.
3+ # All rights reserved.
4+ #
5+ # This source code is licensed under the BSD-style license found in the
6+ # LICENSE file in the root directory of this source tree.
7+
18cmake_minimum_required(VERSION 3.24)
29set(CMAKE_CXX_STANDARD 17)
310
Original file line number Diff line number Diff line change 1- python3 scripts/download.py --repo-id $1 && python3 scripts/convert_hf_checkpoint.py --checkpoint-dir checkpoints/$1
1+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2+ # All rights reserved.
3+
4+ # This source code is licensed under the license found in the
5+ # LICENSE file in the root directory of this source tree.
6+
7+ python3 scripts/download.py --repo-id $1 && python3 scripts/convert_hf_checkpoint.py --checkpoint-dir checkpoints/$1
Original file line number Diff line number Diff line change 1+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2+ # All rights reserved.
3+
4+ # This source code is licensed under the license found in the
5+ # LICENSE file in the root directory of this source tree.
6+
17export MODEL_REPO=meta-llama/Llama-2-7b-chat-hf
28rm -r checkpoints/$MODEL_REPO
39python3 scripts/download.py --repo-id $MODEL_REPO
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3+ * All rights reserved.
4+ *
5+ * This source code is licensed under the BSD-style license found in the
6+ * LICENSE file in the root directory of this source tree.
7+ */
8+
19/* Inference for Llama-2 Transformer model in pure C */
210/* this uses the same logic regardless of AOTI OR ET */
311/* but requires different data types - ATen vs ETen */
Original file line number Diff line number Diff line change 1+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2+ # All rights reserved.
3+
4+ # This source code is licensed under the license found in the
5+ # LICENSE file in the root directory of this source tree.
6+
17from time import perf_counter
28from typing import Optional
39
You can’t perform that action at this time.
0 commit comments