Skip to content

Commit

Permalink
Probably broken hack exploring emscripten
Browse files Browse the repository at this point in the history
  • Loading branch information
lukestanley committed Jul 4, 2023
1 parent 55dbb91 commit 41cbd2b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,9 @@ libllama.so: llama.o ggml.o $(OBJS)
$(CXX) $(CXXFLAGS) -shared -fPIC -o $@ $^ $(LDFLAGS)

clean:
rm -vf *.o *.so main quantize quantize-stats perplexity embedding benchmark-matmult save-load-state server vdot train-text-from-scratch embd-input-test build-info.h

rm -vf *.o *.so quantize quantize-stats perplexity embedding benchmark-matmult save-load-state server vdot train-text-from-scratch embd-input-test build-info.h
rm -f *.o main.{html,wasm,js,data,worker.js}
rm -f common.o examples/common.o
#
# Examples
#
Expand All @@ -284,6 +285,9 @@ main: examples/main/main.cpp build-info.h ggml.
@echo '==== Run ./main -h for help. ===='
@echo

main.html: examples/main/main.cpp ggml.o llama.o examples/common.o $(OBJS)
$(CXX) $(CXXFLAGS) examples/main/main.cpp ggml.o llama.o examples/common.o -o main.html $(LDFLAGS)

simple: examples/simple/simple.cpp build-info.h ggml.o llama.o common.o $(OBJS)
$(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS)

Expand Down
4 changes: 2 additions & 2 deletions examples/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#pragma once

#include "llama.h"
#include "../llama.h"

#include <string>
#include <vector>
Expand Down Expand Up @@ -48,7 +48,7 @@ struct gpt_params {
float mirostat_tau = 5.00f; // target entropy
float mirostat_eta = 0.10f; // learning rate

std::string model = "models/7B/ggml-model.bin"; // model path
std::string model = "models/orca-mini-3b.ggmlv3.q4_0.bin"; // model path
std::string model_alias = "unknown"; // model alias
std::string prompt = "";
std::string path_prompt_cache = ""; // path to file for saving/loading prompt eval state
Expand Down
8 changes: 4 additions & 4 deletions examples/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#define _GNU_SOURCE
#endif

#include "common.h"
#include "llama.h"
#include "build-info.h"
#include "../common.h"
#include "../../llama.h"
//#include "../../build-info.h"

#include <cassert>
#include <cinttypes>
Expand Down Expand Up @@ -92,7 +92,7 @@ int main(int argc, char ** argv) {
params.n_ctx = 8;
}

fprintf(stderr, "%s: build = %d (%s)\n", __func__, BUILD_NUMBER, BUILD_COMMIT);
// fprintf(stderr, "%s: build = %d (%s)\n", __func__, BUILD_NUMBER, BUILD_COMMIT);

if (params.seed == LLAMA_DEFAULT_SEED) {
params.seed = time(NULL);
Expand Down

0 comments on commit 41cbd2b

Please sign in to comment.