Giter Club home page Giter Club logo

mozolm's Introduction

GitHub license C++ version Build Tests (Linux) Build Tests (macOS) Build Tests (Windows) Build Tests (Android) Build Tests (iOS)

MozoLM

A language model serving library, with middleware functionality including mixing of probabilities from disparate base language model types and tokenizations along with RPC client/server interactions.

License

MozoLM is licensed under the terms of the Apache license. See LICENSE for more information.

Citation

If you use this software in a publication, please cite the accompanying paper from SLPAT 2022:

@inproceedings{roark-gutkin-2022-design,
    title = "Design principles of an open-source language modeling microservice package for {AAC} text-entry applications",
    author = "Roark, Brian and Gutkin, Alexander",
    booktitle = "Ninth Workshop on Speech and Language Processing for Assistive Technologies (SLPAT-2022)",
    month = may,
    year = "2022",
    address = "Dublin, Ireland",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2022.slpat-1.1",
    doi = "10.18653/v1/2022.slpat-1.1",
    pages = "1--16",
}

Mandatory Disclaimer

This is not an officially supported Google product.

mozolm's People

Contributors

agutkin avatar derekmauro avatar jaybeavers avatar katre avatar kylebgorman avatar lwolfsonkin avatar roark-google 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mozolm's Issues

[win64] RE2 link errors

Injection of protobuf-matchers repo with its dependence on re2 introduced a regression in Windows build:

re2.lib(re2.obj) : error LNK2005: "public: __cdecl re2::RE2::Options::Options(enum re2::RE2::CannedOptions)" (??0Options@RE2@re2@@QEAA@W4CannedOptions@12@@Z) already defined in re2.lib(re2.obj)
    SET ***
re2.lib(re2.obj) : error LNK2005: "public: __cdecl re2::RE2::RE2(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0RE2@re2@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined in re2.lib(re2.obj)
    SET TEMP=C:\Users\RUNNER~1\AppData\Local\Temp
re2.lib(re2.obj) : error LNK2005: "public: __cdecl re2::RE2::RE2(class re2::StringPiece const &)" (??0RE2@re2@@QEAA@AEBVStringPiece@1@@Z) already defined in re2.lib(re2.obj)
    SET TMP=C:\Users\RUNNER~1\AppData\Local\Temp
re2.lib(re2.obj) : error LNK2005: "public: __cdecl re2::RE2::RE2(class re2::StringPiece const &,class re2::RE2::Options const &)" (??0RE2@re2@@QEAA@AEBVStringPiece@1@AEBVOptions@01@@Z) already defined in re2.lib(re2.obj)
  C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.28.29910/bin/HostX64/x64/link.exe @bazel-out/x64_windows-opt/bin/mozolm/grpc/mozolm_client_async_impl_test.exe-2.params
re2.lib(re2.obj) : error LNK2005: "public: __cdecl re2::RE2::RE2(char const *)" (??0RE2@re2@@QEAA@PEBD@Z) already defined in re2.lib(re2.obj)
Execution platform: @local_config_platform//:host
re2.lib(re2.obj) : error LNK2005: "public: __cdecl re2::RE2::~RE2(void)" (??1RE2@re2@@QEAA@XZ) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: class std::map<int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<int>,class std::allocator<struct std::pair<int const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const & __cdecl re2::RE2::CapturingGroupNames(void)const " (?CapturingGroupNames@RE2@re2@@QEBAAEBV?$map@HV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@U?$less@H@2@V?$allocator@U?$pair@$$CBHV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@std@@@2@@std@@XZ) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: bool __cdecl re2::RE2::CheckRewriteString(class re2::StringPiece const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)const " (?CheckRewriteString@RE2@re2@@QEBA_NAEBVStringPiece@2@PEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: static bool __cdecl re2::RE2::ConsumeN(class re2::StringPiece *,class re2::RE2 const &,class re2::RE2::Arg const * const * const,int)" (?ConsumeN@RE2@re2@@SA_NPEAVStringPiece@2@AEBV12@QEBQEBVArg@12@H@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "private: bool __cdecl re2::RE2::DoMatch(class re2::StringPiece const &,enum re2::RE2::Anchor,unsigned __int64 *,class re2::RE2::Arg const * const * const,int)const " (?DoMatch@RE2@re2@@AEBA_NAEBVStringPiece@2@W4Anchor@12@PEA_KQEBQEBVArg@12@H@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: static bool __cdecl re2::RE2::Extract(class re2::StringPiece const &,class re2::RE2 const &,class re2::StringPiece const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)" (?Extract@RE2@re2@@SA_NAEBVStringPiece@2@AEBV12@0PEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: static bool __cdecl re2::RE2::FindAndConsumeN(class re2::StringPiece *,class re2::RE2 const &,class re2::RE2::Arg const * const * const,int)" (?FindAndConsumeN@RE2@re2@@SA_NPEAVStringPiece@2@AEBV12@QEBQEBVArg@12@H@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: static bool __cdecl re2::RE2::FullMatchN(class re2::StringPiece const &,class re2::RE2 const &,class re2::RE2::Arg const * const * const,int)" (?FullMatchN@RE2@re2@@SA_NAEBVStringPiece@2@AEBV12@QEBQEBVArg@12@H@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "void (__cdecl*__cdecl re2::hooks::GetDFASearchFailureHook(void))(struct re2::hooks::DFASearchFailure const &)" (?GetDFASearchFailureHook@hooks@re2@@YAP6AXAEBUDFASearchFailure@12@@ZXZ) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "void (__cdecl*__cdecl re2::hooks::GetDFAStateCacheResetHook(void))(struct re2::hooks::DFAStateCacheReset const &)" (?GetDFAStateCacheResetHook@hooks@re2@@YAP6AXAEBUDFAStateCacheReset@12@@ZXZ) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: static int __cdecl re2::RE2::GlobalReplace(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,class re2::RE2 const &,class re2::StringPiece const &)" (?GlobalReplace@RE2@re2@@SAHPEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV12@AEBVStringPiece@2@@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "private: void __cdecl re2::RE2::Init(class re2::StringPiece const &,class re2::RE2::Options const &)" (?Init@RE2@re2@@AEAAXAEBVStringPiece@2@AEBVOptions@12@@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: bool __cdecl re2::RE2::Match(class re2::StringPiece const &,unsigned __int64,unsigned __int64,enum re2::RE2::Anchor,class re2::StringPiece *,int)const " (?Match@RE2@re2@@QEBA_NAEBVStringPiece@2@_K1W4Anchor@12@PEAV32@H@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: static int __cdecl re2::RE2::MaxSubmatch(class re2::StringPiece const &)" (?MaxSubmatch@RE2@re2@@SAHAEBVStringPiece@2@@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,int,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,int> > > const & __cdecl re2::RE2::NamedCapturingGroups(void)const " (?NamedCapturingGroups@RE2@re2@@QEBAAEBV?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HU?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@std@@@2@@std@@XZ) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: int __cdecl re2::RE2::Options::ParseFlags(void)const " (?ParseFlags@Options@RE2@re2@@QEBAHXZ) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: static bool __cdecl re2::RE2::PartialMatchN(class re2::StringPiece const &,class re2::RE2 const &,class re2::RE2::Arg const * const * const,int)" (?PartialMatchN@RE2@re2@@SA_NAEBVStringPiece@2@AEBV12@QEBQEBVArg@12@H@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: bool __cdecl re2::RE2::PossibleMatchRange(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,int)const " (?PossibleMatchRange@RE2@re2@@QEBA_NPEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0H@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: int __cdecl re2::RE2::ProgramFanout(class std::vector<int,class std::allocator<int> > *)const " (?ProgramFanout@RE2@re2@@QEBAHPEAV?$vector@HV?$allocator@H@std@@@std@@@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: int __cdecl re2::RE2::ProgramSize(void)const " (?ProgramSize@RE2@re2@@QEBAHXZ) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl re2::RE2::QuoteMeta(class re2::StringPiece const &)" (?QuoteMeta@RE2@re2@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBVStringPiece@2@@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: static bool __cdecl re2::RE2::Replace(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,class re2::RE2 const &,class re2::StringPiece const &)" (?Replace@RE2@re2@@SA_NPEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV12@AEBVStringPiece@2@@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "private: class re2::Prog * __cdecl re2::RE2::ReverseProg(void)const " (?ReverseProg@RE2@re2@@AEBAPEAVProg@2@XZ) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: int __cdecl re2::RE2::ReverseProgramFanout(class std::vector<int,class std::allocator<int> > *)const " (?ReverseProgramFanout@RE2@re2@@QEBAHPEAV?$vector@HV?$allocator@H@std@@@std@@@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: int __cdecl re2::RE2::ReverseProgramSize(void)const " (?ReverseProgramSize@RE2@re2@@QEBAHXZ) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: bool __cdecl re2::RE2::Rewrite(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,class re2::StringPiece const &,class re2::StringPiece const *,int)const " (?Rewrite@RE2@re2@@QEBA_NPEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBVStringPiece@2@PEBV52@H@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "void __cdecl re2::hooks::SetDFASearchFailureHook(void (__cdecl*)(struct re2::hooks::DFASearchFailure const &))" (?SetDFASearchFailureHook@hooks@re2@@YAXP6AXAEBUDFASearchFailure@12@@Z@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "void __cdecl re2::hooks::SetDFAStateCacheResetHook(void (__cdecl*)(struct re2::hooks::DFAStateCacheReset const &))" (?SetDFAStateCacheResetHook@hooks@re2@@YAXP6AXAEBUDFAStateCacheReset@12@@Z@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "class re2::RE2 const * const re2::hooks::context" (?context@hooks@re2@@3PEBVRE2@2@EB) already defined in re2.lib(re2.obj)
bazel-out\x64_windows-opt\bin\mozolm\grpc\mozolm_client_async_impl_test.exe : fatal error LNK1169: one or more multiply defined symbols found

Picking the abseil branch of re2 doesn't help as protobuf-matchers only supports pure StringPiece-based fresh master branch.

More light-weight `LMScores` proto.

In a simple scenario there is no need to return symbols every time LMScores proto is requested since these are generally immutable if the scores don't need to be sorted.

[macOS] Linking grpc++ fails

Getting following error for the macOS builds when linking grpc++:

ld: illegal thread local variable reference to regular symbol __ZN9grpc_core7ExecCtx9exec_ctx_E for architecture x86_64

Packaging / Distribution will be difficult using an out proc local service

There is going to be a moderate challenge in using mozolm with an out of process service to host the algorithms.

Looks like there is an inprocess transport, but it also seems this might constrain the client to Java? Not sure.

https://grpc.github.io/grpc-java/javadoc/io/grpc/inprocess/package-summary.html


Notes to self for investigating an in proc lib that interoperates with .NET Core 5:

https://github.com/bazelbuild/rules_dotnet
https://docs.microsoft.com/en-us/cpp/dotnet/walkthrough-compiling-a-cpp-program-that-targets-the-clr-in-visual-studio?view=msvc-160

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.