Skip to content

Commit

Permalink
notes
Browse files Browse the repository at this point in the history
  • Loading branch information
mike dupont committed Feb 16, 2024
1 parent 7ebfd19 commit 554eb8e
Show file tree
Hide file tree
Showing 13 changed files with 718 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3062,3 +3062,9 @@
[submodule "2024/02/16/instructor_ex"]
path = 2024/02/16/instructor_ex
url = https://github.com/thmsmlr/instructor_ex
[submodule "2024/02/16/erlang_ml"]
path = 2024/02/16/erlang_ml
url = https://github.com/okeuday/erlang_ml
[submodule "2024/02/16/tree-sitter-menhir"]
path = 2024/02/16/tree-sitter-menhir
url = https://github.com/Kerl13/tree-sitter-menhir
2 changes: 1 addition & 1 deletion 2023/11/13/llama.cpp
Submodule llama.cpp updated 321 files
2 changes: 1 addition & 1 deletion 2024/01/07/ppx-introspector
2 changes: 1 addition & 1 deletion 2024/01/15/lang_agent
Submodule lang_agent updated 76 files
+633 −0 COPYING
+31 −0 Dockerfile
+3 −0 Makefile
+256 −13 README.org
+1 −0 _CoqProject
+1 −1 bin/argiope.ml
+42 −0 bin/dune
+100 −0 bin/execute_self.ml
+125 −0 bin/generate_dungeon.ml
+134 −0 bin/generate_generic.ml
+17 −0 bin/poem.ml
+82 −0 bin/recurse.ml
+181 −48 bin/scanner.ml
+127 −0 bin/simple.ml
+102 −0 bin/simple_grammar.ml
+33 −0 bin/test1.ml
+16 −0 build.sh
+12 −0 build2.sh
+2 −0 build_push.sh
+2 −0 chess.sh
+2 −0 clang.sh
+4 −0 connect.sh
+14 −10 dune-project
+1 −1 huggingface
+1 −0 image_aa.sh
+1 −0 image_local.sh
+11 −11 lang_agent.opam
+510 −0 lib/Begin.v
+7 −0 lib/CoqOfOCaml.v
+74 −0 lib/Embody.v
+114 −0 lib/Lang_model.v
+624 −0 lib/Llama_cpp.v
+6 −0 lib/Model_type.v
+50 −0 lib/Mythos.v
+583 −0 lib/Ollama.v
+54 −0 lib/Openai_client.v
+8 −0 lib/StdLib.v
+46 −0 lib/Test_archetype_instance.v
+2 −0 lib/Yojson.v
+50 −0 lib/athena.hs
+300 −0 lib/athena.json
+310 −0 lib/begin.json
+32 −0 lib/begin.ml
+29 −0 lib/begin.mli
+9 −3 lib/dune
+25 −0 lib/embody.ml
+22 −0 lib/embody.mli
+4 −0 lib/extract_lang_model.v
+28 −0 lib/gpt4.ml
+26 −0 lib/gpt4.ml.txt
+353 −0 lib/lang_model.ml
+410 −0 lib/lang_model.org
+601 −0 lib/lang_model.v
+244 −0 lib/llama_cpp.ml
+584 −0 lib/llama_cpp.txt
+14 −0 lib/model_type.ml
+123 −0 lib/mythos.json
+19 −0 lib/mythos.ml
+16 −0 lib/mythos.mli
+101 −9 lib/ollama.ml
+112 −0 lib/openai_client.ml
+29 −0 lib/task1.txt
+50 −0 lib/test.hs
+55 −0 lib/test.ml
+50 −0 lib/test.mli
+21 −0 lib/test2.hs
+20 −0 lib/test3.ml
+15 −0 lib/test_archetype_instance.ml
+12 −0 lib/test_archetype_instance.mli
+2 −0 lib/yalo.v
+47 −0 proofhead.txt
+6 −0 recurse.sh
+7 −0 run_example.sh
+10 −0 run_example2.sh
+9 −0 run_example3.sh
+1 −0 run_main.sh
2 changes: 1 addition & 1 deletion 2024/02/11/donjon
Submodule donjon updated 1693 files
2 changes: 1 addition & 1 deletion 2024/02/12/lang-agent-streamlit-ui
2 changes: 1 addition & 1 deletion 2024/02/12/meta-coq-common
Submodule meta-coq-common updated from 9da2bc to bc7df7
2 changes: 1 addition & 1 deletion 2024/02/12/streamlit-docker-lang-agent-introspector
Submodule streamlit-docker-lang-agent-introspector updated from c92412 to 397dbd
497 changes: 496 additions & 1 deletion 2024/02/15/notes.org

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions 2024/02/16/erlang_ml
Submodule erlang_ml added at c6f52d
30 changes: 30 additions & 0 deletions 2024/02/16/notes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"content":"\n\nTo answer your question, I'd like to provide a brief overview of the different levels or types of reality that have been proposed in various philosophical and scientific frameworks. This is by no means an exhaustive list, but it should give you an idea of some common ways to order these concepts.\n\n1. Physical Universe: This is the most basic level of reality, often described as the material world or the realm of matter and energy. It is characterized by spatial extension, temporal duration, causality, and physical laws such as those of physics.\n2. Living Universe: Beyond the physical universe lies the living",
"generation_settings":{
"dynatemp_exponent":1.0,
"dynatemp_range":0.0,
"frequency_penalty":0.0,
"grammar":"",
"ignore_eos":false,
"logit_bias":[],
"min_p":0.05000000074505806,
"mirostat":0,
"mirostat_eta":0.10000000149011612,
"mirostat_tau":5.0,
"model":"/usr/share/ollama/.ollama/models/blobs/sha256:e8a35b5937a5e6d5c35d1f2a15f161e07eefe5e5bb0a3cdd42998ee79b057730",
"n_ctx":512,
"n_keep":0,
"penalize_nl":true,
"penalty_prompt_tokens":[],
"presence_penalty":0.0,
"repeat_last_n":64,
"repeat_penalty":1.100000023841858,"seed":4294967295,"stop":[],"stream":false,"temperature":0.800000011920929,"tfs_z":1.0,"top_k":40,"top_p":0.949999988079071,"typical_p":1.0,"use_penalty_prompt_tokens":false
},
"model":"/usr/share/ollama/.ollama/models/blobs/sha256:e8a35b5937a5e6d5c35d1f2a15f161e07eefe5e5bb0a3cdd42998ee79b057730",
"prompt":"consider a consecutive series of types to describe the universe and universe of universes, what is your ordering?consider a consecutive series of types to describe the universe and universe of universes, what is your ordering?",
"slot_id":0,
"stop":true,"stopped_eos":false,"stopped_limit":true,"stopped_word":false,"stopping_word":"",
"timings":{"predicted_ms":14511.037,"predicted_n":128,"predicted_per_second":8.820872002462677,"predicted_per_token_ms":113.3674765625,"prompt_ms":2092.612,"prompt_n":44,"prompt_per_second":21.026353667091655,"prompt_per_token_ms":47.559363636363635
},
"tokens_cached":171,"tokens_evaluated":44,"tokens_predicted":128,"truncated":false
}
177 changes: 177 additions & 0 deletions 2024/02/16/notes.org
Original file line number Diff line number Diff line change
Expand Up @@ -708,3 +708,180 @@ git submodule add https://github.com/thmsmlr/instructor_ex
#+RESULTS:



#+begin_src shell
git submodule add https://github.com/okeuday/erlang_ml
#+end_src

#+RESULTS:


* ppx coq introspector
now take the ppx introspector and apply it to the coq plugin
and wrap the coq types to serialize them to the llm.
instead of grammar in the llm lets use a more generic one with inline grammars.

* voting system for new terms
paxos protocol
consensus protocol to align model versions and weights
so they can come to an agreement on what terms means.
weak equivalency between model weight sections.
bunch of sentences with same meaning -> weakly equilvalent weights.
we can a a mapping from one to the other and back.
between different llm model versions like mistral and terms.

X^2
for n in all of X for m in all of X compare n and m.

system A and B
for all terms in A, look in b for something similar and
reverse.

searchspace = location^2*items^2*verbs1*verbs2

codegen searchspace
|filter for good stuff
| convert to python
| test code
| aim for the good stuff
coq model
ocamsl types

modules. dep. graphs. versions.
metis graph partitioning. tulip. graph clustering.

**
Error at `Assoc (
[
("content",
`String ("\n\nTo provide an answer, let's first define some terms and concepts:\n\n1. Universe: The totality of all existence, including all matter, energy, space, and time. It is the sum total of everything that exists or can be observed.\n2. Multiverse: A collection of multiple universes, each with its own set of fields and interactions. This concept arises in theoretical physics as a solution to certain problems, such as the fine-tuning problem or the cosmological constant problem.\n3. Meta-universe: The universe that contains all universes, including the multiverse.")
);
("generation_settings",
`Assoc (
[
("dynatemp_exponent", `Float (1.));
("dynatemp_range", `Float (0.));
("frequency_penalty", `Float (0.));
("grammar", `String (""));
("ignore_eos", `Bool (false));
("logit_bias", `List ([]));
("min_p", `Float (0.0500000007451));
("mirostat", `Int (0));
("mirostat_eta", `Float (0.10000000149));
("mirostat_tau", `Float (5.));
("model",
`String ("/usr/share/ollama/.ollama/models/blobs/sha256:e8a35b5937a5e6d5c35d1f2a15f161e07eefe5e5bb0a3cdd42998ee79b057730"));
("n_ctx", `Int (512));
("n_keep", `Int (0));
("n_predict", `Int (128));
("n_probs", `Int (0));
("penalize_nl", `Bool (true));
("penalty_prompt_tokens", `List ([]));
("presence_penalty", `Float (0.));
("repeat_last_n", `Int (64));
("repeat_penalty", `Float (1.10000002384));
("seed", `Int (4294967295));
("stop", `List ([]));
("stream", `Bool (false));
("temperature", `Float (0.800000011921));
("tfs_z", `Float (1.));
("top_k", `Int (40));
("top_p", `Float (0.949999988079));
("typical_p", `Float (1.));
("use_penalty_prompt_tokens", `Bool (false))
]));

("model",
`String ("/usr/share/ollama/.ollama/models/blobs/sha256:e8a35b5937a5e6d5c35d1f2a15f161e07eefe5e5bb0a3cdd42998ee79b057730"));
("prompt",
`String ("consider a consecutive series of types to describe the universe and universe of universes, what is your ordering?consider a consecutive series of types to describe the universe and universe of universes, what is your ordering?"));
("slot_id", `Int (0));
("stop", `Bool (true));
("stopped_eos", `Bool (false));
("stopped_limit", `Bool (true));
("stopped_word", `Bool (false));
("stopping_word", `String (""));

("tokens_cached", `Int (171));
("tokens_evaluated", `Int (44));
("tokens_predicted", `Int (128));
("truncated", `Bool (false))])


return json {
{"n_ctx", slot.n_ctx},
{"model", params.model_alias},
{"seed", slot.params.seed},
{"temperature", slot.sparams.temp},
{"dynatemp_range", slot.sparams.dynatemp_range},
{"dynatemp_exponent", slot.sparams.dynatemp_exponent},
{"top_k", slot.sparams.top_k},
{"top_p", slot.sparams.top_p},
{"min_p", slot.sparams.min_p},
{"tfs_z", slot.sparams.tfs_z},
{"typical_p", slot.sparams.typical_p},
{"repeat_last_n", slot.sparams.penalty_last_n},
{"repeat_penalty", slot.sparams.penalty_repeat},
{"presence_penalty", slot.sparams.penalty_present},
{"frequency_penalty", slot.sparams.penalty_freq},
{"penalty_prompt_tokens", slot.sparams.penalty_prompt_tokens},
{"use_penalty_prompt_tokens", slot.sparams.use_penalty_prompt_tokens},
{"mirostat", slot.sparams.mirostat},
{"mirostat_tau", slot.sparams.mirostat_tau},
{"mirostat_eta", slot.sparams.mirostat_eta},
{"penalize_nl", slot.sparams.penalize_nl},
{"stop", slot.params.antiprompt},
{"n_predict", slot.params.n_predict},
{"n_keep", params.n_keep},
{"ignore_eos", ignore_eos},
{"stream", slot.params.stream},
{"logit_bias", slot.sparams.logit_bias},
{"n_probs", slot.sparams.n_probs},
{"grammar", slot.sparams.grammar},
};


{"content":"\n\nTo answer your question, I'd like to provide a brief overview of the different levels or types of reality that have been proposed in various philosophical and scientific frameworks. This is by no means an exhaustive list, but it should give you an idea of some common ways to order these concepts.\n\n1. Physical Universe: This is the most basic level of reality, often described as the material world or the realm of matter and energy. It is characterized by spatial extension, temporal duration, causality, and physical laws such as those of physics.\n2. Living Universe: Beyond the physical universe lies the living",
"generation_settings":{
"dynatemp_exponent":1.0,"dynatemp_range":0.0,"frequency_penalty":0.0,"grammar":"","ignore_eos":false,"logit_bias":[],"min_p":0.05000000074505806,"mirostat":0,"mirostat_eta":0.10000000149011612,"mirostat_tau":5.0,"model":"/usr/share/ollama/.ollama/models/blobs/sha256:e8a35b5937a5e6d5c35d1f2a15f161e07eefe5e5bb0a3cdd42998ee79b057730",
"n_ctx":512,"n_keep":0,"n_predict":128,"n_probs":0,"penalize_nl":true,"penalty_prompt_tokens":[],"presence_penalty":0.0,"repeat_last_n":64,"repeat_penalty":1.100000023841858,"seed":4294967295,"stop":[],"stream":false,"temperature":0.800000011920929,"tfs_z":1.0,"top_k":40,"top_p":0.949999988079071,"typical_p":1.0,"use_penalty_prompt_tokens":false},
"model":"/usr/share/ollama/.ollama/models/blobs/sha256:e8a35b5937a5e6d5c35d1f2a15f161e07eefe5e5bb0a3cdd42998ee79b057730","prompt":"consider a consecutive series of types to describe the universe and universe of universes, what is your ordering?consider a consecutive series of types to describe the universe and universe of universes, what is your ordering?","slot_id":0,"stop":true,"stopped_eos":false,"stopped_limit":true,"stopped_word":false,"stopping_word":"",
"timings":{"predicted_ms":14511.037,"predicted_n":128,"predicted_per_second":8.820872002462677,"predicted_per_token_ms":113.3674765625,"prompt_ms":2092.612,"prompt_n":44,"prompt_per_second":21.026353667091655,"prompt_per_token_ms":47.559363636363635},
"tokens_cached":171,"tokens_evaluated":44,"tokens_predicted":128,"truncated":false
}

* tree sitter menhir

ssee 2023/12/23/tree_sitter_grammar_to_gbnf

#+begin_src shell
git submodule add https://github.com/Kerl13/tree-sitter-menhir
#+end_src

#+RESULTS:

menhir parser writen in treesitter lang
-> tree_sitter_grammar_to_gbnf
-> gbnf
menhir parser in gbnf
then llama cpp can now generate new menhir parsers
new menhir parsers can be converted to gbnf
then llama cpp can now generate new gbnf parsers
then llama cpp can now extend itself.

generate me a domain specific grammar for my particular needs,
individual function calls.
then use that grammar.

each of the tools for the agents to use in the simulation has a grammar.
each of the weapons in the game have an action or usage grammar,
sequence of actions to use the weapon. jump , crouch. magic word.
think zork. text based game.

math proof to show validity of semantics.

menhir -> treesitter -> gbnf
menhir -> LLM -> gbnf
ppx introspector -> llm in mehir/gbnf parser.

cat: nodes, edges.
1 change: 1 addition & 0 deletions 2024/02/16/tree-sitter-menhir
Submodule tree-sitter-menhir added at be8866

0 comments on commit 554eb8e

Please sign in to comment.