-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from IlyasMoutawwakil/update-version
update version
- Loading branch information
Showing
7 changed files
with
27 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
from py_txi.text_embedding_inference import TEI, TEIConfig | ||
from py_txi.text_generation_inference import TGI, TGIConfig | ||
|
||
llm = TGI(config=TGIConfig(model_id="bigscience/bloom-560m", gpus="0")) | ||
output = llm.generate(["Hi, I'm a language model", "I'm fine, how are you?"]) | ||
print(len(output)) | ||
print("LLM:", output) | ||
llm.close() | ||
for gpus in [None, "1", "1,2"]: | ||
llm = TGI(config=TGIConfig(model_id="bigscience/bloom-560m", gpus=gpus)) | ||
output = llm.generate(["Hi, I'm a language model", "I'm fine, how are you?"]) | ||
print(len(output)) | ||
print("LLM:", output) | ||
llm.close() | ||
|
||
embed = TEI(config=TEIConfig(model_id="BAAI/bge-base-en-v1.5")) | ||
output = embed.encode(["Hi, I'm an embedding model", "I'm fine, how are you?"]) | ||
print(len(output)) | ||
print("Embed:", output) | ||
embed.close() | ||
embed = TEI(config=TEIConfig(model_id="BAAI/bge-base-en-v1.5", gpus=gpus)) | ||
output = embed.encode(["Hi, I'm an embedding model", "I'm fine, how are you?"]) | ||
print(len(output)) | ||
print("Embed:", output) | ||
embed.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters