-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can this be compiled to run on Windows 10, or Windows XP? #516
Comments
lol. yea absolutely. there is a small fix you need to compile it to run models over 4gig, like llama 7b. Just compile it with ming64 and run it first. |
Hi. According to Google Gemini Pro, compiling a Llama2.c model on a Windows
10 machine is "difficult" also because of high RAM memory requirements.
And "Dependency Hell" due to "libraries optimized for Linux". I apprehend
that the windows-compile task is beyond my experience and practical
ability. Can Windows run the Linux version of Llama2.c within a Windows
builtin Linux environment "MingW64 ~" prompt? Is that the same method as
what you originally proposed? Can you point to simple instructions printed
online?
…On Sat, May 11, 2024, 12:03 AM James Delancey ***@***.***> wrote:
lol. yea absolutely. there is a small fix you need to compile it to run
models over 4gig, like llama 7b. Just compile it with ming64 and run it
first.
—
Reply to this email directly, view it on GitHub
<#516 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BHT6KT2R3CQSZGJRQKGVUEDZBWKAPAVCNFSM6AAAAABHJXVADWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBVGUZDOMBSHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Looking at the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Assuming that a Windows 10 machine can run this code, can this run.c lllama2 be modified to be complied to run inference mode on a Windows 10 machine?
I asked Google Gemini 1.5 Pro this question and this is Gemini's response:
Compiling and Running the Code on Windows 10
While the provided code appears to be primarily written in C, it includes some POSIX-specific elements like mmap and munmap which are not directly available on Windows 10. Therefore, running this code directly on Windows 10 would require some modifications and additional libraries.
Here's a potential approach:
Memory Mapping:
Use the Windows API functions CreateFileMapping, MapViewOfFile, and UnmapViewOfFile to achieve similar functionality as mmap and munmap.
Libraries like Boost.Interprocess could also provide cross-platform memory mapping solutions.
Other Functions:
Review the code for other potential POSIX-specific functions and find equivalent Windows API functions or libraries.
Compiler:
Use a C compiler compatible with Windows, such as Microsoft Visual C++, MinGW, or Clang.
Libraries:
Ensure any required libraries (e.g., for linear algebra operations) have Windows versions or alternatives.
Conditional Compilation:
The code already utilizes #if defined _WIN32 blocks. Adapt these sections to incorporate the necessary Windows-specific implementations.
Consider creating separate source files for platform-specific code to maintain clarity.
Use the chosen compiler and build system to compile the code into an executable.
Run the executable from the command line, providing the required arguments (checkpoint path, options).
Additional Considerations:
OpenMP: The code utilizes OpenMP for parallelization. Ensure you have a compatible OpenMP library and compiler flags set up for Windows.
Testing: Thoroughly test the modified code on Windows 10 to ensure functionality and performance.
Tools and Libraries:
Microsoft Visual Studio
MinGW
Clang
Boost C++ Libraries
OpenMP library for Windows
Disclaimer:
Modifying the code to run on Windows 10 requires some C programming and Windows API knowledge. This response provides a general direction, and specific implementation details may vary.
The text was updated successfully, but these errors were encountered: