GithubHelp home page GithubHelp logo

lean-dojo / leancopilot Goto Github PK

View Code? Open in Web Editor NEW
920.0 12.0 79.0 1.16 MB

LLMs as Copilots for Theorem Proving in Lean

Home Page: https://leandojo.org

License: MIT License

Dockerfile 0.05% Lean 4.76% C++ 93.69% Python 1.40% Shell 0.10%
lean llm-inference machine-learning theorem-proving lean4 formal-mathematics

leancopilot's Introduction

Lean Copilot: LLMs as Copilots for Theorem Proving in Lean

Lean Copilot allows large language models (LLMs) to be used in Lean for proof automation, e.g., suggesting tactics/premises and searching for proofs. You can use our built-in models from LeanDojo or bring your own models that run either locally (w/ or w/o GPUs) or on the cloud.

Lean.Copilot.Demo.mp4

Table of Contents

  1. Requirements
  2. Using Lean Copilot in Your Project
    1. Adding Lean Copilot as a Dependency
    2. Getting Started with Lean Copilot
      1. Tactic Suggestion
      2. Proof Search
      3. Premise Selection
  3. Advanced Usage
    1. Tactic APIs
    2. Model APIs
    3. Bring Your Own Model
  4. Caveats
  5. Getting in Touch
  6. Acknowledgements
  7. Citation

Requirements

  • Supported platforms: Linux, macOS, and Windows WSL; ⚠️ Native Windows currently not supported.
  • Git LFS
  • Optional (recommended if you have a CUDA-enabled GPU): CUDA and cuDNN
  • Required for building Lean Copilot itself (rather than a downstream package): CMake >= 3.7 and a C++17 compatible compiler

Using Lean Copilot in Your Project

⚠️ Your project must use a Lean version of at least lean4:v4.3.0-rc2.

Adding Lean Copilot as a Dependency

  1. Add the package configuration option moreLinkArgs := #["-L./.lake/packages/LeanCopilot/.lake/build/lib", "-lctranslate2"] to lakefile.lean. For example,
package «my-package» {
  moreLinkArgs := #[
    "-L./.lake/packages/LeanCopilot/.lake/build/lib",
    "-lctranslate2"
  ]
}
  1. Add the following line to lakefile.lean, including the quotation marks:
require LeanCopilot from git "https://github.com/lean-dojo/LeanCopilot.git" @ "LEAN_COPILOT_VERSION"

LEAN_COPILOT_VERSION depends on your lean-toolchain:

lean-toolchain Recommended Lean Copilot version
v4.10.0 v1.5.0
v4.10.0-rc2 v1.4.2
v4.10.0-rc1 v1.4.1
v4.9.0 v1.4.0
v4.9.0-rc3 v1.3.3
v4.9.0-rc2 v1.3.2
v4.9.0-rc1 v1.3.1
v4.8.0 v1.3.0
v4.8.0-rc2 v1.2.2
v4.8.0-rc1 v1.2.1
v4.7.0 v1.2.0
v4.7.0-rc2 v1.1.2
v4.6.0-rc1 v1.1.1
v4.5.0 v1.1.0
v4.5.0-rc1 v1.1.0
  1. Run lake update LeanCopilot
  2. Run lake exe LeanCopilot/download to download the built-in models from Hugging Face to ~/.cache/lean_copilot/
  3. Run lake build

Here is an example of a Lean package depending on Lean Copilot. If you have problems building the project, our Dockerfile, build.sh or build_example.sh may be helpful.

Getting Started with Lean Copilot

Tactic Suggestion

After import LeanCopilot, you can use the tactic suggest_tactics to generate tactic suggestions. You can click on any of the suggested tactics to use it in the proof.

suggest_tactics

You can provide a prefix (e.g., simp) to constrain the generated tactics:

suggest_tactics_simp

Proof Search

The tactic search_proof combines LLM-generated tactics with aesop to search for multi-tactic proofs. When a proof is found, you can click on it to insert it into the editor.

search_proof

Premise Selection

The select_premises tactic retrieves a list of potentially useful premises. Currently, it uses the retriever in LeanDojo to select premises from a fixed snapshot of Lean and mathlib4.

select_premises

Running LLMs

You can also run the inference of any LLMs in Lean, which can be used to build customized proof automation or other LLM-based applications (not limited to theorem proving). It's possible to run arbitrary models either locally or remotely (see Bring Your Own Model).

run_llms

Advanced Usage

This section is only for advanced users who would like to change the default behavior of suggest_tactics, search_proof, or select_premises, e.g., to use different models or hyperparameters.

Tactic APIs

  • Examples in TacticSuggestion.lean showcase how to configure suggest_tactics, e.g., to use different models or generate different numbers of tactics.
  • Examples in ProofSearch.lean showcase how to configure search_proof using options provided by aesop.
  • Examples in PremiseSelection.lean showcase how to set the number of retrieved premises for select_premises.

Model APIs

Examples in ModelAPIs.lean showcase how to run the inference of different models and configure their parameters (temperature, beam size, etc.).

Lean Copilot supports two kinds of models: generators and encoders. Generators must implement the TextToText interface:

class TextToText (τ : Type) where
  generate (model : τ) (input : String) (targetPrefix : String) : IO $ Array (String × Float)
  • input is the input string
  • targetPrefix is used to constrain the generator's output. "" means no constraint.
  • generate should return an array of String × Float. Each String is an output from the model, and Float is the corresponding score.

We provide three types of Generators:

Encoders must implement TextToVec:

class TextToVec (τ : Type) where
  encode : τ → String → IO FloatArray
  • input is the input string
  • encode should return a vector embedding produced by the model.

Similar to generators, we have NativeEncoder, ExternalEncoder, and GenericEncoder.

Bring Your Own Model

In principle, it is possible to run any model using Lean Copilot through ExternalGenerator or ExternalEncoder (examples in ModelAPIs.lean). To use a model, you need to wrap it properly to expose the APIs in external_model_api.yaml. As an example, we provide a Python API server and use it to run a few models, including llmstep-mathlib4-pythia2.8b.

Caveats

  • Lean may occasionally crash when restarting or editing a file. Restarting the file again should fix the problem.
  • select_premises always retrieves the original form of a premise. For example, Nat.add_left_comm is a result of the theorem below. In this case, select_premises retrieves Nat.mul_left_comm instead of Nat.add_left_comm.
@[to_additive]
theorem mul_left_comm : ∀ a b c : G, a * (b * c) = b * (a * c)
  • In some cases, search_proof produces an erroneous proof with error messages like fail to show termination for .... A temporary workaround is changing the theorem's name before applying search_proof. You can change it back after search_proof completes.

Getting in Touch

  • For general questions and discussions, please use GitHub Discussions.
  • To report a potential bug, please open an issue. In the issue, please include your OS information and the exact steps to reproduce the error. The more details you provide, the better we will be able to help you.
  • Feature requests and other suggestions are extremely welcome. Please feel free to start a discussion!

Acknowledgements

  • We thank Scott Morrison for suggestions on simplifying Lean Copilot's installation and Mac Malone for helping implement it. Both Scott and Mac work for the Lean FRO.
  • We thank Jannis Limperg for supporting our LLM-generated tactics in Aesop (leanprover-community/aesop#70).

Citation

If you find our work useful, please consider citing our paper:

@misc{song2024largelanguagemodelscopilots,
      title={Towards Large Language Models as Copilots for Theorem Proving in Lean}, 
      author={Peiyang Song and Kaiyu Yang and Anima Anandkumar},
      year={2024},
      eprint={2404.12534},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2404.12534}, 
}

leancopilot's People

Contributors

adarsh321123 avatar alok avatar peiyang-song avatar pitmonticone avatar semorrison avatar tydeu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

leancopilot's Issues

the Lean language server could not connect

I'm sorry to bother you.I opened the vscode software, but the Lean language server could not connect successfully. Because the area is restricted. I use a proxy to access the Internet and configure the proxy address on the vscode client. But it still appears that the Lean language server cannot be successfully connected. What should I do?
屏幕截图 2024-05-27 110955

Lean server crashes after LeanCopilot is used in more advanced topics

When running Lean Copilot v1.4.1 with Lean 4's language v4.10.0-rc1 (including mathlib which I imported completely) in more advanced topics, the Lean server crashes. My operating system is Debian GNU/Linux 12 (bookworm). Thank you in advance for looking into this issue!

I attempted to use Lean Copilot with Kevin Buzzard's Lean 4 course. It worked successfully on the initial logic chapter but failed in more advanced topics like measure theory (e.g. Section13Sheet1). Specifically, the Lean server crashed after I typed commands such as suggest_tactics and search_proof.

Is this a known issue?
When LeanCopilot does not find a tactic or a proof, does LeanCopilot print such a note that or is the Lean server supposed to crash?

Windows Support

I'm not sure how important it is to support Windows (how many Lean users actually use Windows?)

Errors caused by breaking changes in `lean4:v4.3.0-rc2`

Hi Mac @tydeu,

I just noticed the changes in lean4:v4.3.0-rc2 to the directory structures. They caused a few errors in LeanDojo and LeanInfer, which I'm trying to fix. This line was
https://github.com/lean-dojo/LeanInfer/blob/dc8e2b7f4deb648733cd20f913bca812ea0ed3f0/lakefile.lean#L54
, but I changed it to
https://github.com/lean-dojo/LeanInfer/blob/b2925d5f99b35fb7b1c3ef8ad506916c4fa3fa52/lakefile.lean#L54

However, I got the following error when running lake build in a downstream package depending on lean4:v4.3.0-rc2 + LeanInfer:

error: > LEAN_PATH=./.lake/packages/std/.lake/build/lib:./.lake/packages/Qq/.lake/build/lib:./.lake/packages/aesop/.lake/build/lib:./.lake/packages/Cli/.lake/build/lib:./.lake/packages/proofwidgets/build/lib:./.lake/packages/mathlib/.lake/build/lib:./.lake/packages/LeanInfer/.lake/build/lib:./.lake/build/lib LD_LIBRARY_PATH=/home/kaiyu/local/usr/lib:/home/kaiyu/clang+llvm-13.0.1-x86_64-linux-gnu-ubuntu-18.04/lib/x86_64-unknown-linux-gnu:/home/kaiyu/clang+llvm-13.0.1-x86_64-linux-gnu-ubuntu-18.04/lib:/usr/local/cuda/lib64::./.lake/packages/LeanInfer/.lake/build/lib:./.lake/packages/LeanInfer/.lake/build/lib /home/kaiyu/.elan/toolchains/leanprover--lean4---v4.3.0-rc2/bin/lean --load-dynlib=./.lake/packages/LeanInfer/build/lib/libonnxruntime.so --load-dynlib=./.lake/packages/LeanInfer/build/lib/libctranslate2.so ./.lake/packages/LeanInfer/././LeanInfer/Frontend.lean -R ./.lake/packages/LeanInfer/./. -o ./.lake/packages/LeanInfer/.lake/build/lib/LeanInfer/Frontend.olean -i ./.lake/packages/LeanInfer/.lake/build/lib/LeanInfer/Frontend.ilean -c ./.lake/packages/LeanInfer/.lake/build/ir/LeanInfer/Frontend.c --load-dynlib=./.lake/packages/LeanInfer/.lake/build/lib/libleanffi.so
error: stderr:
libc++abi: terminating due to uncaught exception of type lean::exception: error loading library, ./.lake/packages/LeanInfer/build/lib/libonnxruntime.so: cannot open shared object file: No such file or directory
error: external command `/home/kaiyu/.elan/toolchains/leanprover--lean4---v4.3.0-rc2/bin/lean` exited with code 134

Presumably, the error is because s!"-L{__dir__}/build/lib" doesn't exist for lean4:v4.3.0-rc2. Depending on the Lean version, either s!"-L{__dir__}/build/lib" or s!"-L{__dir__}/.lake/build/lib" exists, but not both. Is there a way to make the project work for both lean4:v4.3.0-rc2 and older versions of Lean?

Thanks!

"lakefile.lean: package configuration has errors"

I installed lean4 using vscode in Windows WSL system and created a project with Mathlib library. Then I followed the installation tutorial and installed LeanCopilot with ubuntu. The error result is as follows,
1
2
3
4

The error result are "lakefile.lean:179:18: error: type mismatch","lakefile.lean:235:18: error: type mismatch"and"lakefile.lean: package configuration has errors".
What should I do? Thank you for your reply.

Usability Improvements

  • Installation (cloud release, testing)
  • Interface for user-provided models
  • Documentation

difficulty installing on MacOS, CTranslate2 related

my lakefile:

import Lake
open Lake DSL
require scilean from git "https://github.com/lecopivo/SciLean" @ "master"
require LeanCopilot from git "https://github.com/lean-dojo/LeanCopilot.git" @ "v1.1.2"

package ScileanExtra where
  moreLinkArgs := #[
    "-L./.lake/packages/LeanCopilot/.lake/build/lib",
    "-lctranslate2"
  ]


lean_lib «ScileanExtra» where

@[default_target]
lean_exe «scilean-extra» where
  root := `Main

try to import leancopilot gives:

Failed responding to request 14423: error loading library, dlopen(./.lake/packages/LeanCopilot/.lake/build/lib/libleanffi.dylib, 0x0009): Library not loaded: @rpath/libctranslate2.3.dylib
  Referenced from: <4C4C44DC-5555-3144-A126-85C66AEB5F51> /Users/alokbeniwal/scilean-extra/.lake/packages/LeanCopilot/.lake/build/lib/libleanffi.dylib (built for macOS 99.0 which is newer than running OS)
  Reason: tried: './.lake/packages/std/.lake/build/lib/libctranslate2.3.dylib' (no such file), 
-- (etc)

the strange thing is that the files do seem to exist

.lake/packages/LeanCopilot/.lake/build/include/ctranslate2/
.lake/packages/LeanCopilot/.lake/build/lib/libctranslate2.3.dylib
.lake/packages/LeanCopilot/.lake/build/lib/libctranslate2.4.dylib
.lake/packages/LeanCopilot/.lake/build/lib/libctranslate2.dylib
.lake/packages/LeanCopilot/.lake/build/lib/libctranslate2.dylib.hash
.lake/packages/LeanCopilot/.lake/build/lib/libctranslate2.dylib.trace

2024-04-25-02-04-13

LeanInfer could not build when tested on Github Codespace

The issues were posted on Zulip, please check there for more context.

TL;DR

  1. Github Codespace can only compile after -stdlib=libc++ is removed
  2. lake build hangs indefinitely in linking, and it's not using much CPU

Issue Details

I've tried out lean4-example in Github Codespace, I got the following issues:

  1. lake build fails to compile C++ with Clang++, resolved by removing all -stdlib=libc++from the lakefile of LeanInfer
lean4-example (improve-installation) $ lake build
[23/197] Compiling ffi.cpp
error: > clang++ -c -o ./lake-packages/LeanInfer/build/ffi.o ./lake-packages/LeanInfer/ffi.cpp -fPIC -std=c++11 -stdlib=libc++ -O3 -I /home/codespace/.elan/toolchains/leanprover--lean4---v4.0.0/include
error: stderr:
In file included from ./lake-packages/LeanInfer/ffi.cpp:1:
/home/codespace/.elan/toolchains/leanprover--lean4---v4.0.0/include/lean/lean.h:14:10: fatal error: 'atomic' file not found
#include <atomic>
         ^~~~~~~~
1 error generated.
error: external command `clang++` exited with code 1

I ran bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" from https://apt.llvm.org/ to fix it, no change.
Then I test the clang++ command with extra options -E -x c++ -v at the end, it showed the following search path:

ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/codespace/.elan/toolchains/leanprover--lean4---v4.0.0/include
 /usr/local/include
 /usr/lib/llvm-10/lib/clang/10.0.0/include
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.

which is shorter than a raw clang++ -E -x c++ - -v < /dev/null 2>&1 which shows

ignoring nonexistent directory "/include"
ignoring duplicate directory "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9"
#include "..." search starts here:
#include <...> search starts here:
 /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9
 /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9
 /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/backward
 /usr/local/include
 /usr/lib/llvm-10/lib/clang/10.0.0/include
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.

Clearly Clang++ stop looking for the GNU C++ headers if -stdlib=libc++ is present. If Github Codespace misses it I guess it would be missed in the environments of many end-users.

  1. After resolved issue 1, I end up having the same issue fatal error: 'onnxruntime_cxx_api.h' file not found, resolved by
( cd /workspace/ && wget https://github.com/microsoft/onnxruntime/releases/download/v1.15.1/onnxruntime-linux-x64-1.15.1.tgz && tar xzvf  onnxruntime-linux-x64-1.15.1.tgz)

Then add "-I", "/workspaces/onnxruntime-linux-x64-1.15.1/include" to flags in LeanInfer lakefile or just add CPATH environment variable as instructed.

  1. Run lake build after step 2, I have the same linker error libc++abi: terminating due to uncaught exception of type lean::exception: error loading library, libonnxruntime.so.1.15.1: cannot open shared object file: No such file or directory, I tried to fix it by adding "-L", "/workspace/onnxruntime-linux-x64-1.15.1/lib/" to moreLinkArgs then
LD_LIBRARY_PATH=/workspaces/onnxruntime-linux-x64-1.15.1/lib/ lake build

But the build hangs indefinitely, and it's not using much CPU (<3%). So far, I'm stuck here.

Lean 4.5.0 , not working

I added the lines

require LeanCopilot from git "https://github.com/lean-dojo/LeanCopilot.git" @ v1.1.0

moreLinkArgs := #["-L./.lake/packages/LeanCopilot/.lake/build/lib", "-lctranslate2"]

In the end of a fresh lakefile.lean file, a new project!

ar@tranco puzzles % lean -v
Lean (version 4.5.0, commit 1a3021f98e55, Release)
ar@tranco puzzles % elan show
installed toolchains
--------------------

leanprover/lean4:nightly-2023-12-31
leanprover/lean4:stable (default)

active toolchain
----------------

leanprover/lean4:stable (overridden by '/Users/ar/r/puzzles/lean-toolchain')
Lean (version 4.5.0, commit 1a3021f98e55, Release)

ar@tranco puzzles % lake update LeanCopilot   
error: ./lakefile.lean:14:78: error: unknown identifier 'v1'
error: ./lakefile.lean:14:82: error: invalid field notation, identifier or numeral expected
error: ./lakefile.lean:14:83: error: unexpected token; expected command
error: ./lakefile.lean: package configuration has errors

any idea?

unknown package

I followed the steps in the leancopilot readme immediately after installing lean and dependencies. I have not updated curl.
$ lake update LeanCopilot
warning; Qq: ignoring missing dependency manifest ‘./.lake/packages/Qq/lake-manifest.json’
warning: Cli: ignoring missing dependency manifest ‘./.lake/packages/Cli/lake-manifest.json’
mathlib: running post-update hooks
Warning: recommended ‘curl’ version >=7.70. Found 7.64.1. Can’t use ‘--parallel.’
No files to download
Decompressing 4291 file(s)
unpacked in 72690 ms
$ lean exe LeanCopilot/download
error unknown package ‘LeanCopilot’
$

Trying to use Lean Copilot to develop the std library but hitting a build dependency cycle

@yangky11 @semorrison @tydeu I'd like to use Lean Copilot to develop std library proofs but the normal install instructions fail. Copilot depends on std, so std can't depend on copilot.

Should it be possible to use Lean Copilot to develop std? If so, what do you recommend?

Thanks.


I tried to hack this by renaming my local instance of std to be std4 but I couldn't get it working. That said, I don't know Lean's build system. If it's useful, here's what I tried:

-- lakefile.lean
-package std where
+package std4 where

-- I also added the moreLinkArgs and require LeanCopilot lines
# alias Std/ as Std4/ and create Std4.lean
ln -s Std Std4
cp Std.lean Std4.lean

# rename Std references to Std4 in both Std4.lean and all *.lean files within Std/
sed -i '' -e 's/Std/Std4/g' Std4.lean
pushd Std
for f in `find . -iname '*.lean'`; do
  sed -i '' -e 's/Std/Std4/g' $f
  sed -i '' -e 's/Std4in/Stdin/g' $f
done
popd

Running lake clean; lake build makes progress for awhile but eventually hits this:

...

[126/307] Building Std4.Lean.Meta.Simp
[127/307] Building Std4.Lean.Format
error: > LEAN_PATH=./.lake/packages/std/.lake/build/lib:./.lake/packages/aesop/.lake/build/lib:./.lake/packages/LeanCopilot/.lake/build/lib:./.lake/build/lib DYLD_LIBRARY_PATH=./.lake/build/lib /Users/atlas/.elan/toolchains/leanprover--lean4---v4.5.0-rc1/bin/lean -Dlinter.missingDocs=true ./././Std4/Tactic/CoeExt.lean -R ././. -o ./.lake/build/lib/Std4/Tactic/CoeExt.olean -i ./.lake/build/lib/Std4/Tactic/CoeExt.ilean -c ./.lake/build/ir/Std4/Tactic/CoeExt.c
error: stdout:
./././Std4/Tactic/CoeExt.lean:8:25: error: unknown namespace 'Std4'
./././Std4/Tactic/CoeExt.lean:31:10: error: unknown identifier 'elabTerm'
./././Std4/Tactic/CoeExt.lean:32:19: error: unknown identifier 'coerceToFunction?'
./././Std4/Tactic/CoeExt.lean:35:42: error: unknown identifier 'indentExpr'
./././Std4/Tactic/CoeExt.lean:39:10: error: unknown identifier 'elabTerm'
./././Std4/Tactic/CoeExt.lean:40:19: error: unknown identifier 'coerceToSort?'
./././Std4/Tactic/CoeExt.lean:43:38: error: unknown identifier 'indentExpr'
./././Std4/Tactic/CoeExt.lean:55:11: error: function expected at
  ToExpr
term has type
  ?m.2380
./././Std4/Tactic/CoeExt.lean:72:11: error: function expected at
  ToExpr
term has type
  ?m.4293
./././Std4/Tactic/CoeExt.lean:77:20: error: function expected at
  SimpleScopedEnvExtension
term has type
  ?m.4326
./././Std4/Tactic/CoeExt.lean:78:2: error: unknown identifier 'registerSimpleScopedEnvExtension'
./././Std4/Tactic/CoeExt.lean:77:20: error: function expected at
  SimpleScopedEnvExtension
term has type
  ?m.4370
./././Std4/Tactic/CoeExt.lean:76:0: error: initialization function '[email protected]._hyg.762' must have type of the form `IO <type>`
./././Std4/Tactic/CoeExt.lean:84:32: error: function expected at
  CoreM
term has type
  ?m.4428
./././Std4/Tactic/CoeExt.lean:87:5: error: unknown namespace 'PrettyPrinter.Delaborator'
./././Std4/Tactic/CoeExt.lean:94:49: error: unknown identifier 'whenPPOption'
./././Std4/Tactic/CoeExt.lean:107:57: error: function expected at
  MetaM
term has type
  ?m.4492
./././Std4/Tactic/CoeExt.lean:121:71: error: function expected at
  MetaM
term has type
  ?m.4549
./././Std4/Tactic/CoeExt.lean:137:11: error: unknown identifier 'registerBuiltinAttribute'
error: external command `/Users/atlas/.elan/toolchains/leanprover--lean4---v4.5.0-rc1/bin/lean` exited with code 1
[127/307] Building Std4.Tactic.NoMatch
[128/307] Compiling Std.Linter.UnreachableTactic
error: > LEAN_PATH=./.lake/packages/std/.lake/build/lib:./.lake/packages/aesop/.lake/build/lib:./.lake/packages/LeanCopilot/.lake/build/lib:./.lake/build/lib DYLD_LIBRARY_PATH=./.lake/build/lib /Users/atlas/.elan/toolchains/leanprover--lean4---v4.5.0-rc1/bin/lean -Dlinter.missingDocs=true ./././Std4/Lean/Format.lean -R ././. -o ./.lake/build/lib/Std4/Lean/Format.olean -i ./.lake/build/lib/Std4/Lean/Format.ilean -c ./.lake/build/ir/Std4/Lean/Format.c
error: stdout:
./././Std4/Lean/Format.lean:18:33: error: unknown identifier 'prettyM'
error: external command `/Users/atlas/.elan/toolchains/leanprover--lean4---v4.5.0-rc1/bin/lean` exited with code 1

process 'git' exited with code 128

I posted my "process 'git' exited with code 128" problem on zulip yesterday.
https://leanprover.zulipchat.com/#narrow/stream/219941-Machine-Learning-for-Theorem-Proving/topic/Installing.20Lean.20Copilot.20but.20have.20.22git.22.20problem/near/453716556

I deleted all files in ".cache\lean_copilot" folder and re-ran "lake update LeanCopilot" and then "lake exe Leancopilot/download", the terminal says "uncaught exception: Failed to download the model. You can download it manually from https://huggingface.co/kaiyuy/ct2-leandojo-lean4-tacgen-byt5-small and store it in /Users/albertjiao/.cache/lean_copilot/models/huggingface.co/kaiyuy/ct2-leandojo-lean4-tacgen-byt5-small/."
terminal⬇️
截屏2024-07-25 10 19 50
I'm not sure I got the manual downloading right, but here's what I download to that folder⬇️
截屏2024-07-25 10 25 54
After manual downloading, I ran the "lake exe LeanCopilot/download" again and receive the "git exit with code 128" problem
截屏2024-07-25 10 20 24

Having issue setup Lean Copilot with lean toolchain = v4.8.0-rc1

Hi, I try to add LeanCopilot as the instruction given with lean toolchain = v4.8.0-rc1, but encounter the following error when running "lake update LeanCopilot" step:

info: LeanCopilot: updating repository '././.lake/packages/LeanCopilot' to revision 'f3c42628d9ce0612f5004af0efd88e7504347b32'
error: ././.lake/packages/LeanCopilot/lakefile.lean:109:25: error: application type mismatch
Glob.submodules "LeanCopilotTests"
argument
"LeanCopilotTests"
has type
String : Type
but is expected to have type
Name : Type
warning: ././.lake/packages/LeanCopilot/lakefile.lean:119:57: warning: Lake.SchedulerM has been deprecated, use Lake.SpawnM instead
warning: ././.lake/packages/LeanCopilot/lakefile.lean:119:79: warning: Lake.IndexBuildM has been deprecated, use Lake.FetchM instead
warning: ././.lake/packages/LeanCopilot/lakefile.lean:126:58: warning: Lake.BuildM has been deprecated, use Lake.FetchM instead
warning: ././.lake/packages/LeanCopilot/lakefile.lean:126:70: warning: Lake.IndexBuildM has been deprecated, use Lake.FetchM instead
error: ././.lake/packages/LeanCopilot/lakefile.lean:180:8: error: unknown identifier 'logStep'
error: ././.lake/packages/LeanCopilot/lakefile.lean:185:8: error: unknown identifier 'logStep'
error: ././.lake/packages/LeanCopilot/lakefile.lean:236:8: error: unknown identifier 'logStep'
error: ././.lake/packages/LeanCopilot/lakefile.lean:241:8: error: unknown identifier 'logStep'
error: ././.lake/packages/LeanCopilot/lakefile.lean:244:8: error: unknown identifier 'logStep'
warning: ././.lake/packages/LeanCopilot/lakefile.lean:283:75: warning: Lake.SchedulerM has been deprecated, use Lake.SpawnM instead
error: ././.lake/packages/LeanCopilot/lakefile.lean:290:33: error: application type mismatch
@compileo { toString := path.toString } oFile deps[0]!
argument
deps[0]!
has type
FilePath : outParam Type
but is expected to have type
optParam (Array String) #[] : Type
error: ././.lake/packages/LeanCopilot/lakefile.lean: package configuration has errors

Could you check with this? Thanks!

unknown package "LeanCopilot"

I followed the instruction: modified lakefile and typed commands in the terminal, but still failed to set up. (Ubuntu 24.04)
Screenshot from 2024-07-20 19-32-27
Screenshot from 2024-07-20 19-34-46

uncaught exception: process 'git' exited with code 128

Thanks for your wonderful contribution, I am very interested in LeanCopilot and aim to make my own contribution in mathematical formalization and automatic theorem proving.

My device is Mac, when I configure LeanCopilot, specifically, when I run to step 4, I encounter the error uncaught exception: process 'git' exited with code 128, which is also shown in the following picture.

I don't know how to solve it. Do you have any suggestions?

截屏2024-06-13 22 03 24 截屏2024-06-13 22 03 51

Lean Copilot v1.2.2 (standalone, no mathlib) not working

When running Lean Copilot v1.2.2 with lean4's language v4.8.0-rc2 (standalone, without mathlib), I receive some warnings and an error. I'm running Ubuntu 22.04. Also, thank you in advance for reading this issue!

lake update LeanCopilot works okay; the output from my running the command is below:

Code
info: batteries: cloning https://github.com/leanprover-community/batteries.git to '././.lake/packages/batteries'
info: aesop: cloning https://github.com/leanprover-community/aesop to '././.lake/packages/aesop'

lake exe LeanCopilot/download is when issues start popping up:

Code
ℹ [3/18] Replayed LeanCopilot/libopenblas
info: Cloning OpenBLAS from https://github.com/OpenMathLib/OpenBLAS
info: Building OpenBLAS with `make NO_LAPACK=1 NO_FORTRAN=1 -j8`
ℹ [4/18] Replayed LeanCopilot/libctranslate2
info: Cloning CTranslate2 from https://github.com/OpenNMT/CTranslate2
info: Configuring CTranslate2 with `cmake -DBUILD_CLI=OFF -DOPENMP_RUNTIME=NONE -DWITH_DNNL=OFF -DWITH_MKL=OFF -DWITH_ACCELERATE=OFF -DWITH_OPENBLAS=ON -DOPENBLAS_INCLUDE_DIR=../../OpenBLAS -DOPENBLAS_LIBRARY=../../OpenBLAS/libopenblas.so -DWITH_CUDA=OFF -DWITH_CUDNN=OFF ..`
info: Building CTranslate2 with `make -j8`
info: stdout:
[  1%] Building C object third_party/cpu_features/CMakeFiles/utils.dir/src/string_view.c.o
[  3%] Building C object third_party/cpu_features/CMakeFiles/utils.dir/src/stack_line_reader.c.o
[  3%] Building C object third_party/cpu_features/CMakeFiles/utils.dir/src/filesystem.c.o
[  3%] Built target utils
[  3%] Building C object third_party/cpu_features/CMakeFiles/cpu_features.dir/src/impl_aarch64_linux_or_android.c.o
[  5%] Building C object third_party/cpu_features/CMakeFiles/cpu_features.dir/src/impl_arm_linux_or_android.c.o
[  5%] Building C object third_party/cpu_features/CMakeFiles/cpu_features.dir/src/impl_x86_freebsd.c.o
[  5%] Building C object third_party/cpu_features/CMakeFiles/cpu_features.dir/src/impl_mips_linux_or_android.c.o
[  6%] Building C object third_party/cpu_features/CMakeFiles/cpu_features.dir/src/impl_x86_linux_or_android.c.o
[  7%] Building C object third_party/cpu_features/CMakeFiles/cpu_features.dir/src/impl_x86_macos.c.o
[  8%] Building C object third_party/cpu_features/CMakeFiles/cpu_features.dir/src/impl_ppc_linux.c.o
[  9%] Building C object third_party/cpu_features/CMakeFiles/cpu_features.dir/src/impl_x86_windows.c.o
[  9%] Linking C static library libcpu_features.a
[  9%] Built target cpu_features
[ 10%] Building CXX object CMakeFiles/ctranslate2.dir/src/allocator.cc.o
[ 11%] Building CXX object CMakeFiles/ctranslate2.dir/src/buffered_translation_wrapper.cc.o
[ 13%] Building CXX object CMakeFiles/ctranslate2.dir/src/batch_reader.cc.o
[ 14%] Building CXX object CMakeFiles/ctranslate2.dir/src/cpu/allocator.cc.o
[ 14%] Building CXX object CMakeFiles/ctranslate2.dir/src/cpu/backend.cc.o
[ 15%] Building CXX object CMakeFiles/ctranslate2.dir/src/cpu/cpu_info.cc.o
[ 16%] Building CXX object CMakeFiles/ctranslate2.dir/src/cpu/kernels.cc.o
[ 17%] Building CXX object CMakeFiles/ctranslate2.dir/src/cpu/cpu_isa.cc.o
[ 17%] Building CXX object CMakeFiles/ctranslate2.dir/src/cpu/parallel.cc.o
[ 18%] Building CXX object CMakeFiles/ctranslate2.dir/src/cpu/primitives.cc.o
[ 19%] Building CXX object CMakeFiles/ctranslate2.dir/src/decoding_utils.cc.o
[ 20%] Building CXX object CMakeFiles/ctranslate2.dir/src/decoding.cc.o
[ 20%] Building CXX object CMakeFiles/ctranslate2.dir/src/devices.cc.o
[ 21%] Building CXX object CMakeFiles/ctranslate2.dir/src/dtw.cc.o
[ 22%] Building CXX object CMakeFiles/ctranslate2.dir/src/encoder.cc.o
[ 23%] Building CXX object CMakeFiles/ctranslate2.dir/src/env.cc.o
[ 25%] Building CXX object CMakeFiles/ctranslate2.dir/src/filesystem.cc.o
[ 25%] Building CXX object CMakeFiles/ctranslate2.dir/src/generator.cc.o
[ 26%] Building CXX object CMakeFiles/ctranslate2.dir/src/layers/attention_layer.cc.o
[ 27%] Building CXX object CMakeFiles/ctranslate2.dir/src/layers/attention.cc.o
[ 28%] Building CXX object CMakeFiles/ctranslate2.dir/src/layers/flash_attention.cc.o
[ 28%] Building CXX object CMakeFiles/ctranslate2.dir/src/layers/common.cc.o
[ 29%] Building CXX object CMakeFiles/ctranslate2.dir/src/layers/decoder.cc.o
[ 30%] Building CXX object CMakeFiles/ctranslate2.dir/src/layers/transformer.cc.o
[ 31%] Building CXX object CMakeFiles/ctranslate2.dir/src/layers/wav2vec2.cc.o
[ 31%] Building CXX object CMakeFiles/ctranslate2.dir/src/layers/whisper.cc.o
[ 32%] Building CXX object CMakeFiles/ctranslate2.dir/src/logging.cc.o
[ 33%] Building CXX object CMakeFiles/ctranslate2.dir/src/models/language_model.cc.o
[ 34%] Building CXX object CMakeFiles/ctranslate2.dir/src/models/model.cc.o
[ 35%] Building CXX object CMakeFiles/ctranslate2.dir/src/models/model_factory.cc.o
[ 35%] Building CXX object CMakeFiles/ctranslate2.dir/src/models/model_reader.cc.o
[ 36%] Building CXX object CMakeFiles/ctranslate2.dir/src/models/sequence_to_sequence.cc.o
[ 38%] Building CXX object CMakeFiles/ctranslate2.dir/src/models/transformer.cc.o
[ 39%] Building CXX object CMakeFiles/ctranslate2.dir/src/models/wav2vec2.cc.o
[ 39%] Building CXX object CMakeFiles/ctranslate2.dir/src/models/whisper.cc.o
[ 40%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/activation.cc.o
[ 41%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/add.cc.o
[ 42%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/alibi_add.cc.o
[ 42%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/alibi_add_cpu.cc.o
[ 43%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/bias_add.cc.o
[ 44%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/bias_add_cpu.cc.o
[ 45%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/concat.cc.o
[ 46%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/concat_split_slide_cpu.cc.o
[ 46%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/conv1d.cc.o
[ 47%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/conv1d_cpu.cc.o
[ 48%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/cos.cc.o
[ 50%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/dequantize.cc.o
[ 50%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/dequantize_cpu.cc.o
[ 51%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/flash_attention.cc.o
[ 52%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/flash_attention_cpu.cc.o
[ 53%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/gather.cc.o
[ 53%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/gather_cpu.cc.o
[ 54%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/gelu.cc.o
[ 55%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/gemm.cc.o
[ 56%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/gumbel_max.cc.o
[ 57%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/gumbel_max_cpu.cc.o
[ 57%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/layer_norm.cc.o
[ 58%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/layer_norm_cpu.cc.o
[ 59%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/log.cc.o
[ 60%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/matmul.cc.o
[ 60%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/mean.cc.o
[ 61%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/mean_cpu.cc.o
[ 63%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/median_filter.cc.o
[ 64%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/min_max.cc.o
[ 64%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/mul.cc.o
[ 65%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/multinomial.cc.o
[ 66%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/multinomial_cpu.cc.o
[ 67%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/quantize.cc.o
[ 68%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/quantize_cpu.cc.o
[ 68%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/relu.cc.o
[ 69%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/rms_norm.cc.o
[ 70%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/rms_norm_cpu.cc.o
[ 71%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/rotary.cc.o
[ 71%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/rotary_cpu.cc.o
[ 72%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/sin.cc.o
[ 73%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/softmax.cc.o
[ 75%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/softmax_cpu.cc.o
[ 75%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/split.cc.o
[ 76%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/slide.cc.o
[ 77%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/sub.cc.o
[ 78%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/swish.cc.o
[ 79%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/tanh.cc.o
[ 79%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/tile.cc.o
[ 80%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/tile_cpu.cc.o
[ 81%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/topk.cc.o
[ 82%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/topk_cpu.cc.o
[ 82%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/topp_mask.cc.o
[ 83%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/topp_mask_cpu.cc.o
[ 84%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/transpose.cc.o
[ 85%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/nccl_ops.cc.o
[ 86%] Building CXX object CMakeFiles/ctranslate2.dir/src/padder.cc.o
[ 86%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/nccl_ops_cpu.cc.o
[ 88%] Building CXX object CMakeFiles/ctranslate2.dir/src/profiler.cc.o
[ 89%] Building CXX object CMakeFiles/ctranslate2.dir/src/random.cc.o
[ 90%] Building CXX object CMakeFiles/ctranslate2.dir/src/sampling.cc.o
[ 90%] Building CXX object CMakeFiles/ctranslate2.dir/src/scoring.cc.o
[ 91%] Building CXX object CMakeFiles/ctranslate2.dir/src/storage_view.cc.o
[ 92%] Building CXX object CMakeFiles/ctranslate2.dir/src/thread_pool.cc.o
[ 93%] Building CXX object CMakeFiles/ctranslate2.dir/src/translator.cc.o
[ 93%] Building CXX object CMakeFiles/ctranslate2.dir/src/types.cc.o
[ 94%] Building CXX object CMakeFiles/ctranslate2.dir/src/utils.cc.o
[ 95%] Building CXX object CMakeFiles/ctranslate2.dir/src/vocabulary.cc.o
[ 96%] Building CXX object CMakeFiles/ctranslate2.dir/src/vocabulary_map.cc.o
[ 96%] Building CXX object CMakeFiles/ctranslate2.dir/kernels_avx.cc.o
[ 97%] Building CXX object CMakeFiles/ctranslate2.dir/kernels_avx2.cc.o
[ 98%] Building CXX object CMakeFiles/ctranslate2.dir/kernels_avx512.cc.o
[100%] Linking CXX shared library libctranslate2.so
[100%] Built target ctranslate2
info: stderr:
In file included from /home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/kernels.cc:19:
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/vec.h:148:65: warning: unused parameter 'count' [-Wunused-parameter]
      static inline void convert_and_store(float v, U* a, dim_t count) {
                                                                ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/backend.cc:51:18: warning: unused variable 'is_int8' [-Wunused-variable]
      const bool is_int8 = (compute_type == ComputeType::INT8
                 ^
1 warning generated.
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:881:43: warning: unused parameter 'transpose_a' [-Wunused-parameter]
                                     bool transpose_a, bool transpose_b,
                                          ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:881:61: warning: unused parameter 'transpose_b' [-Wunused-parameter]
                                     bool transpose_a, bool transpose_b,
                                                            ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:882:44: warning: unused parameter 'm' [-Wunused-parameter]
                                     dim_t m, dim_t n, dim_t k,
                                           ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:882:53: warning: unused parameter 'n' [-Wunused-parameter]
                                     dim_t m, dim_t n, dim_t k,
                                                    ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:882:62: warning: unused parameter 'k' [-Wunused-parameter]
                                     dim_t m, dim_t n, dim_t k,
                                                             ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:883:44: warning: unused parameter 'alpha' [-Wunused-parameter]
                                     float alpha,
                                           ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:884:52: warning: unused parameter 'a' [-Wunused-parameter]
                                     const int8_t* a, dim_t lda,
                                                   ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:884:61: warning: unused parameter 'lda' [-Wunused-parameter]
                                     const int8_t* a, dim_t lda,
                                                            ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:885:52: warning: unused parameter 'b' [-Wunused-parameter]
                                     const int8_t* b, dim_t ldb,
                                                   ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:885:61: warning: unused parameter 'ldb' [-Wunused-parameter]
                                     const int8_t* b, dim_t ldb,
                                                            ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:886:44: warning: unused parameter 'beta' [-Wunused-parameter]
                                     float beta,
                                           ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:887:47: warning: unused parameter 'c' [-Wunused-parameter]
                                     int32_t* c, dim_t ldc,
                                              ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:887:56: warning: unused parameter 'ldc' [-Wunused-parameter]
                                     int32_t* c, dim_t ldc,
                                                       ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:888:53: warning: unused parameter 'a_shift_compensation' [-Wunused-parameter]
                                     const int32_t* a_shift_compensation) {
                                                    ^
1 warning generated.
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/layers/flash_attention.cc:19:65: warning: unused parameter 'values' [-Wunused-parameter]
                                             const StorageView& values,
                                                                ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/layers/flash_attention.cc:26:60: warning: unused parameter 'values_padder' [-Wunused-parameter]
                                             const Padder* values_padder,
                                                           ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/layers/flash_attention.cc:28:59: warning: unused parameter 'position_bias' [-Wunused-parameter]
                                             StorageView* position_bias,
                                                          ^
3 warnings generated.
14 warnings generated.
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/models/model.cc:448:25: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
      for (int i = 0; i < num; ++i) {
                      ~ ^ ~~~
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/models/model.cc:739:32: warning: comparison of integers of different signs: 'std::vector::size_type' (aka 'unsigned long') and 'int' [-Wsign-compare]
            if (outputs.size() > current_index && !outputs[current_index].empty())
                ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/models/model.cc:454:17: warning: unused function 'replace' [-Wunused-function]
    static bool replace(std::string& str, const std::string& from, const std::string& to) {
                ^
3 warnings generated.
In file included from /home/ubuntu/LeanCopilot/.lake/build/CTranslate2/build/kernels_avx.cc:13:
In file included from /home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/vec_avx.h:13:
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/vec.h:148:65: warning: unused parameter 'count' [-Wunused-parameter]
      static inline void convert_and_store(float v, U* a, dim_t count) {
                                                                ^
In file included from /home/ubuntu/LeanCopilot/.lake/build/CTranslate2/build/kernels_avx512.cc:7:
In file included from /home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/vec_avx512.h:6:
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/vec.h:148:65: warning: unused parameter 'count' [-Wunused-parameter]
      static inline void convert_and_store(float v, U* a, dim_t count) {
                                                                ^
In file included from /home/ubuntu/LeanCopilot/.lake/build/CTranslate2/build/kernels_avx2.cc:10:
In file included from /home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/vec_avx.h:13:
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/vec.h:148:65: warning: unused parameter 'count' [-Wunused-parameter]
      static inline void convert_and_store(float v, U* a, dim_t count) {
                                                                ^
1 warning generated.
1 warning generated.
1 warning generated.
ℹ [10/18] Replayed ModelCheckpointManager.Url
info: ././././ModelCheckpointManager/Url.lean:68:0: { protocol := "https", hostname := "huggingface.co", path := FilePath.mk "kaiyuy/ct2-leandojo-lean4-tacgen-byt5-small" }
info: ././././ModelCheckpointManager/Url.lean:69:0: { protocol := "https", hostname := "huggingface.co", path := FilePath.mk "bert-base-uncased" }
info: ././././ModelCheckpointManager/Url.lean:71:0: "ct2-leandojo-lean4-tacgen-byt5-small"
info: ././././ModelCheckpointManager/Url.lean:72:0: "bert-base-uncased"
The model is available at /home/mfan/.cache/lean_copilot/models/huggingface.co/kaiyuy/ct2-leandojo-lean4-retriever-byt5-small
The model is available at /home/mfan/.cache/lean_copilot/models/huggingface.co/kaiyuy/ct2-byt5-small
The model is available at /home/mfan/.cache/lean_copilot/models/huggingface.co/kaiyuy/premise-embeddings-leandojo-lean4-retriever-byt5-small
The model is available at /home/mfan/.cache/lean_copilot/models/huggingface.co/kaiyuy/ct2-leandojo-lean4-tacgen-byt5-small
Done!

lake build also has some issues:

Code
ℹ [3/14] Replayed LeanCopilot/libopenblas
info: Cloning OpenBLAS from https://github.com/OpenMathLib/OpenBLAS
info: Building OpenBLAS with `make NO_LAPACK=1 NO_FORTRAN=1 -j8`
ℹ [6/14] Replayed LeanCopilot/libctranslate2
info: Cloning CTranslate2 from https://github.com/OpenNMT/CTranslate2
info: Configuring CTranslate2 with `cmake -DBUILD_CLI=OFF -DOPENMP_RUNTIME=NONE -DWITH_DNNL=OFF -DWITH_MKL=OFF -DWITH_ACCELERATE=OFF -DWITH_OPENBLAS=ON -DOPENBLAS_INCLUDE_DIR=../../OpenBLAS -DOPENBLAS_LIBRARY=../../OpenBLAS/libopenblas.so -DWITH_CUDA=OFF -DWITH_CUDNN=OFF ..`
info: Building CTranslate2 with `make -j8`
info: stdout:
[  1%] Building C object third_party/cpu_features/CMakeFiles/utils.dir/src/string_view.c.o
[  3%] Building C object third_party/cpu_features/CMakeFiles/utils.dir/src/stack_line_reader.c.o
[  3%] Building C object third_party/cpu_features/CMakeFiles/utils.dir/src/filesystem.c.o
[  3%] Built target utils
[  3%] Building C object third_party/cpu_features/CMakeFiles/cpu_features.dir/src/impl_aarch64_linux_or_android.c.o
[  5%] Building C object third_party/cpu_features/CMakeFiles/cpu_features.dir/src/impl_arm_linux_or_android.c.o
[  5%] Building C object third_party/cpu_features/CMakeFiles/cpu_features.dir/src/impl_x86_freebsd.c.o
[  5%] Building C object third_party/cpu_features/CMakeFiles/cpu_features.dir/src/impl_mips_linux_or_android.c.o
[  6%] Building C object third_party/cpu_features/CMakeFiles/cpu_features.dir/src/impl_x86_linux_or_android.c.o
[  7%] Building C object third_party/cpu_features/CMakeFiles/cpu_features.dir/src/impl_x86_macos.c.o
[  8%] Building C object third_party/cpu_features/CMakeFiles/cpu_features.dir/src/impl_ppc_linux.c.o
[  9%] Building C object third_party/cpu_features/CMakeFiles/cpu_features.dir/src/impl_x86_windows.c.o
[  9%] Linking C static library libcpu_features.a
[  9%] Built target cpu_features
[ 10%] Building CXX object CMakeFiles/ctranslate2.dir/src/allocator.cc.o
[ 11%] Building CXX object CMakeFiles/ctranslate2.dir/src/buffered_translation_wrapper.cc.o
[ 13%] Building CXX object CMakeFiles/ctranslate2.dir/src/batch_reader.cc.o
[ 14%] Building CXX object CMakeFiles/ctranslate2.dir/src/cpu/allocator.cc.o
[ 14%] Building CXX object CMakeFiles/ctranslate2.dir/src/cpu/backend.cc.o
[ 15%] Building CXX object CMakeFiles/ctranslate2.dir/src/cpu/cpu_info.cc.o
[ 16%] Building CXX object CMakeFiles/ctranslate2.dir/src/cpu/kernels.cc.o
[ 17%] Building CXX object CMakeFiles/ctranslate2.dir/src/cpu/cpu_isa.cc.o
[ 17%] Building CXX object CMakeFiles/ctranslate2.dir/src/cpu/parallel.cc.o
[ 18%] Building CXX object CMakeFiles/ctranslate2.dir/src/cpu/primitives.cc.o
[ 19%] Building CXX object CMakeFiles/ctranslate2.dir/src/decoding_utils.cc.o
[ 20%] Building CXX object CMakeFiles/ctranslate2.dir/src/decoding.cc.o
[ 20%] Building CXX object CMakeFiles/ctranslate2.dir/src/devices.cc.o
[ 21%] Building CXX object CMakeFiles/ctranslate2.dir/src/dtw.cc.o
[ 22%] Building CXX object CMakeFiles/ctranslate2.dir/src/encoder.cc.o
[ 23%] Building CXX object CMakeFiles/ctranslate2.dir/src/env.cc.o
[ 25%] Building CXX object CMakeFiles/ctranslate2.dir/src/filesystem.cc.o
[ 25%] Building CXX object CMakeFiles/ctranslate2.dir/src/generator.cc.o
[ 26%] Building CXX object CMakeFiles/ctranslate2.dir/src/layers/attention_layer.cc.o
[ 27%] Building CXX object CMakeFiles/ctranslate2.dir/src/layers/attention.cc.o
[ 28%] Building CXX object CMakeFiles/ctranslate2.dir/src/layers/flash_attention.cc.o
[ 28%] Building CXX object CMakeFiles/ctranslate2.dir/src/layers/common.cc.o
[ 29%] Building CXX object CMakeFiles/ctranslate2.dir/src/layers/decoder.cc.o
[ 30%] Building CXX object CMakeFiles/ctranslate2.dir/src/layers/transformer.cc.o
[ 31%] Building CXX object CMakeFiles/ctranslate2.dir/src/layers/wav2vec2.cc.o
[ 31%] Building CXX object CMakeFiles/ctranslate2.dir/src/layers/whisper.cc.o
[ 32%] Building CXX object CMakeFiles/ctranslate2.dir/src/logging.cc.o
[ 33%] Building CXX object CMakeFiles/ctranslate2.dir/src/models/language_model.cc.o
[ 34%] Building CXX object CMakeFiles/ctranslate2.dir/src/models/model.cc.o
[ 35%] Building CXX object CMakeFiles/ctranslate2.dir/src/models/model_factory.cc.o
[ 35%] Building CXX object CMakeFiles/ctranslate2.dir/src/models/model_reader.cc.o
[ 36%] Building CXX object CMakeFiles/ctranslate2.dir/src/models/sequence_to_sequence.cc.o
[ 38%] Building CXX object CMakeFiles/ctranslate2.dir/src/models/transformer.cc.o
[ 39%] Building CXX object CMakeFiles/ctranslate2.dir/src/models/wav2vec2.cc.o
[ 39%] Building CXX object CMakeFiles/ctranslate2.dir/src/models/whisper.cc.o
[ 40%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/activation.cc.o
[ 41%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/add.cc.o
[ 42%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/alibi_add.cc.o
[ 42%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/alibi_add_cpu.cc.o
[ 43%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/bias_add.cc.o
[ 44%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/bias_add_cpu.cc.o
[ 45%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/concat.cc.o
[ 46%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/concat_split_slide_cpu.cc.o
[ 46%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/conv1d.cc.o
[ 47%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/conv1d_cpu.cc.o
[ 48%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/cos.cc.o
[ 50%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/dequantize.cc.o
[ 50%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/dequantize_cpu.cc.o
[ 51%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/flash_attention.cc.o
[ 52%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/flash_attention_cpu.cc.o
[ 53%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/gather.cc.o
[ 53%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/gather_cpu.cc.o
[ 54%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/gelu.cc.o
[ 55%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/gemm.cc.o
[ 56%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/gumbel_max.cc.o
[ 57%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/gumbel_max_cpu.cc.o
[ 57%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/layer_norm.cc.o
[ 58%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/layer_norm_cpu.cc.o
[ 59%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/log.cc.o
[ 60%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/matmul.cc.o
[ 60%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/mean.cc.o
[ 61%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/mean_cpu.cc.o
[ 63%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/median_filter.cc.o
[ 64%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/min_max.cc.o
[ 64%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/mul.cc.o
[ 65%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/multinomial.cc.o
[ 66%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/multinomial_cpu.cc.o
[ 67%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/quantize.cc.o
[ 68%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/quantize_cpu.cc.o
[ 68%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/relu.cc.o
[ 69%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/rms_norm.cc.o
[ 70%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/rms_norm_cpu.cc.o
[ 71%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/rotary.cc.o
[ 71%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/rotary_cpu.cc.o
[ 72%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/sin.cc.o
[ 73%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/softmax.cc.o
[ 75%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/softmax_cpu.cc.o
[ 75%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/split.cc.o
[ 76%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/slide.cc.o
[ 77%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/sub.cc.o
[ 78%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/swish.cc.o
[ 79%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/tanh.cc.o
[ 79%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/tile.cc.o
[ 80%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/tile_cpu.cc.o
[ 81%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/topk.cc.o
[ 82%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/topk_cpu.cc.o
[ 82%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/topp_mask.cc.o
[ 83%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/topp_mask_cpu.cc.o
[ 84%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/transpose.cc.o
[ 85%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/nccl_ops.cc.o
[ 86%] Building CXX object CMakeFiles/ctranslate2.dir/src/padder.cc.o
[ 86%] Building CXX object CMakeFiles/ctranslate2.dir/src/ops/nccl_ops_cpu.cc.o
[ 88%] Building CXX object CMakeFiles/ctranslate2.dir/src/profiler.cc.o
[ 89%] Building CXX object CMakeFiles/ctranslate2.dir/src/random.cc.o
[ 90%] Building CXX object CMakeFiles/ctranslate2.dir/src/sampling.cc.o
[ 90%] Building CXX object CMakeFiles/ctranslate2.dir/src/scoring.cc.o
[ 91%] Building CXX object CMakeFiles/ctranslate2.dir/src/storage_view.cc.o
[ 92%] Building CXX object CMakeFiles/ctranslate2.dir/src/thread_pool.cc.o
[ 93%] Building CXX object CMakeFiles/ctranslate2.dir/src/translator.cc.o
[ 93%] Building CXX object CMakeFiles/ctranslate2.dir/src/types.cc.o
[ 94%] Building CXX object CMakeFiles/ctranslate2.dir/src/utils.cc.o
[ 95%] Building CXX object CMakeFiles/ctranslate2.dir/src/vocabulary.cc.o
[ 96%] Building CXX object CMakeFiles/ctranslate2.dir/src/vocabulary_map.cc.o
[ 96%] Building CXX object CMakeFiles/ctranslate2.dir/kernels_avx.cc.o
[ 97%] Building CXX object CMakeFiles/ctranslate2.dir/kernels_avx2.cc.o
[ 98%] Building CXX object CMakeFiles/ctranslate2.dir/kernels_avx512.cc.o
[100%] Linking CXX shared library libctranslate2.so
[100%] Built target ctranslate2
info: stderr:
In file included from /home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/kernels.cc:19:
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/vec.h:148:65: warning: unused parameter 'count' [-Wunused-parameter]
      static inline void convert_and_store(float v, U* a, dim_t count) {
                                                                ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/backend.cc:51:18: warning: unused variable 'is_int8' [-Wunused-variable]
      const bool is_int8 = (compute_type == ComputeType::INT8
                 ^
1 warning generated.
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:881:43: warning: unused parameter 'transpose_a' [-Wunused-parameter]
                                     bool transpose_a, bool transpose_b,
                                          ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:881:61: warning: unused parameter 'transpose_b' [-Wunused-parameter]
                                     bool transpose_a, bool transpose_b,
                                                            ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:882:44: warning: unused parameter 'm' [-Wunused-parameter]
                                     dim_t m, dim_t n, dim_t k,
                                           ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:882:53: warning: unused parameter 'n' [-Wunused-parameter]
                                     dim_t m, dim_t n, dim_t k,
                                                    ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:882:62: warning: unused parameter 'k' [-Wunused-parameter]
                                     dim_t m, dim_t n, dim_t k,
                                                             ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:883:44: warning: unused parameter 'alpha' [-Wunused-parameter]
                                     float alpha,
                                           ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:884:52: warning: unused parameter 'a' [-Wunused-parameter]
                                     const int8_t* a, dim_t lda,
                                                   ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:884:61: warning: unused parameter 'lda' [-Wunused-parameter]
                                     const int8_t* a, dim_t lda,
                                                            ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:885:52: warning: unused parameter 'b' [-Wunused-parameter]
                                     const int8_t* b, dim_t ldb,
                                                   ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:885:61: warning: unused parameter 'ldb' [-Wunused-parameter]
                                     const int8_t* b, dim_t ldb,
                                                            ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:886:44: warning: unused parameter 'beta' [-Wunused-parameter]
                                     float beta,
                                           ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:887:47: warning: unused parameter 'c' [-Wunused-parameter]
                                     int32_t* c, dim_t ldc,
                                              ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:887:56: warning: unused parameter 'ldc' [-Wunused-parameter]
                                     int32_t* c, dim_t ldc,
                                                       ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/primitives.cc:888:53: warning: unused parameter 'a_shift_compensation' [-Wunused-parameter]
                                     const int32_t* a_shift_compensation) {
                                                    ^
1 warning generated.
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/layers/flash_attention.cc:19:65: warning: unused parameter 'values' [-Wunused-parameter]
                                             const StorageView& values,
                                                                ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/layers/flash_attention.cc:26:60: warning: unused parameter 'values_padder' [-Wunused-parameter]
                                             const Padder* values_padder,
                                                           ^
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/layers/flash_attention.cc:28:59: warning: unused parameter 'position_bias' [-Wunused-parameter]
                                             StorageView* position_bias,
                                                          ^
3 warnings generated.
14 warnings generated.
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/models/model.cc:448:25: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
      for (int i = 0; i < num; ++i) {
                      ~ ^ ~~~
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/models/model.cc:739:32: warning: comparison of integers of different signs: 'std::vector::size_type' (aka 'unsigned long') and 'int' [-Wsign-compare]
            if (outputs.size() > current_index && !outputs[current_index].empty())
                ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/models/model.cc:454:17: warning: unused function 'replace' [-Wunused-function]
    static bool replace(std::string& str, const std::string& from, const std::string& to) {
                ^
3 warnings generated.
In file included from /home/ubuntu/LeanCopilot/.lake/build/CTranslate2/build/kernels_avx.cc:13:
In file included from /home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/vec_avx.h:13:
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/vec.h:148:65: warning: unused parameter 'count' [-Wunused-parameter]
      static inline void convert_and_store(float v, U* a, dim_t count) {
                                                                ^
In file included from /home/ubuntu/LeanCopilot/.lake/build/CTranslate2/build/kernels_avx512.cc:7:
In file included from /home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/vec_avx512.h:6:
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/vec.h:148:65: warning: unused parameter 'count' [-Wunused-parameter]
      static inline void convert_and_store(float v, U* a, dim_t count) {
                                                                ^
In file included from /home/ubuntu/LeanCopilot/.lake/build/CTranslate2/build/kernels_avx2.cc:10:
In file included from /home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/vec_avx.h:13:
/home/ubuntu/LeanCopilot/.lake/build/CTranslate2/src/cpu/vec.h:148:65: warning: unused parameter 'count' [-Wunused-parameter]
      static inline void convert_and_store(float v, U* a, dim_t count) {
                                                                ^
1 warning generated.
1 warning generated.
1 warning generated.
Build completed successfully.

Finally, importing LeanCopilot works okay, but then trying to use suggest_tactics causes lean4 to crash, shown below: (reduced quality to save space)

Lean.Copilot.v1.2.2.Issue.480p.mov

I've also run:

  • Lean Copilot v1.2.1 with lean4's language v4.8.0-rc1 with mathlib4's version v4.8.0-rc1, which didn't work (similar issues occurred here; quite similar, actually, implying perhaps that v1.2.1 onwards may not be working too correctly. I don't believe there were much issues in mathlib4 (maybe there were), so maybe the fix for v1.2.1 previously may have caused a few issues.
  • Lean Copilot v1.2.0 with lean4's language v4.7.0 with mathlib4's version v4.7.0 (copied from my repo), which did work for a bit (probably it stopped working after some time because the mathlib directory probably refers to some other code that does tests with the original repo that I copied from and/or uses the original repo in some other way).

Thank you for replying in advance!

How to check each tactic candidate?

In your paper about Lean Copilot, I read that: "When applied, it feeds the current goal into an LLM and obtains a list of generated tactic candidates from the LLM. It checks each tactic candidate to see if they (1) lead to errors; (2) result in no errors but cannot finish the proof; (3) successfully finish the proof."

For the first step of inputting the current goal and generating tactic candidates, I read the relevant implementation steps in ModelAPIs.lean and models.py.

For the second step about check, I would like to ask in which file it is implemented? I'm interested in this judgment step, any response would be very appreciated.

Building LeanCopilot package to use GPU

@yangky11 I'm also trying to build Lean Copilot on NVIDIA cuda-compatible GPU. I was able to build locally, but on the GPU, it's throwing an error at the same stage as above. A little about the machine:

  • linux x86_64
  • NVIDIA A100 GPUs

The build error:

ℹ [3/1126] Replayed LeanCopilot/libopenblas
info: Cloning OpenBLAS from https://github.com/OpenMathLib/OpenBLAS
info: Building OpenBLAS with `make NO_LAPACK=1 NO_FORTRAN=1 -j32`
✖ [4/1126] Building LeanCopilot/libctranslate2
info: Cloning CTranslate2 from https://github.com/OpenNMT/CTranslate2
error: no such file or directory (error code: 2)
  file: ././.lake/packages/LeanCopilot/.lake/build/lib/libctranslate2.so
Some builds logged failures:
- LeanCopilot/libctranslate2
error: build failed

A little help would be much appreciated!

Originally posted by @vanessalama09 in #76 (comment)

CI fails when testing external examples

CI fails at testing-external. The log looks like a failure from lake build. However I have tried running the exactly same steps on Ubuntu machines with or without CUDA-enabled GPUs, and everything builds just fine. It is strange that it does not succeed in CI.

buildArchive?

Hi @tydeu,

I recently upgraded to the latest Lean v4.6.0-rc1 and found that now I have to manually add the OS and tar.gz to buildArchive?. Just wanted to double-check if that's expected.

def buildArchiveName : String :=

Please see these two commits:
965d4ba
4bc4e6c

PANIC when running `ModelAPIs.lean`

When running ModelAPIs.lean, a warning PANIC: Invalid UTF-8 string is throwed, with no meaningful cause/position information. We can try to find its cause and fix it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.