Hi @guillaumekln,
Thanks for your reply.
please have a look below on the code and system specifications.
Code:
import ctranslate2
import sentencepiece as spm
Input = "This project is geared towards efficient serving of standard translation models but is also a place for experimentation around model compression and inference acceleration."
def tokenize(data):
return sp.encode(data, out_type=str)
def detokenize(data):
return sp.decode(data)
translator = ctranslate2.Translator("ende_ctranslate2/", cpu)
sp = spm.SentencePieceProcessor(model_file='wmtende.model')
results = translator.translate_batch(
[tokenize(Input)],
target_prefix=[tokenize("Dieses Prokekt ist auf die")],
num_hypotheses=5,
return_alternatives=True)
for hypothesis in results[0]:
print(detokenize(hypothesis["tokens"]))
system specification:
Currently, I installed virtual ubuntu on my windows 10 and the ctranslate2 is running from ubuntu. I am sharing the specifications of both operating systems.
1. Windows:
Edition: windows 10 Pro (intel corei7)
Processor: Intel® Core™ i7-5600U CPU @ 2.60GHz, 2601 Mhz, 2 Core(s), 4 Logica Processor(s)
Intalled RAM: 12,0 GB (11,9 usable).
System Type: 64-bit os
2. Ubuntu app running on Windows 10 System info:
System: Host: ORB173990 Kernel: 4.4.0-18362-Microsoft x86_64 bits: 64 Console: tty 3 Distro: Ubuntu 20.04.1 LTS (Focal Fossa)
Machine: Message: No machine data: try newer kernel. Is dmidecode installed? Try -M
dmidecode.
CPU: Topology: Dual Core model: Intel Core i7-5600U bits: 64 type: MT MCP L2 cache: 256 KiB
Speed: 2601 MHz min/max: N/A Core speeds (MHz): 1: 2601 2: 2601 3: 2601 4: 2601
Graphics: Message: Device data requires root.
Display: server: X.org 1.20.8 driver: tty: 120x30
Network: Message: Device data requires root.
IF-ID-1: eth0 state: N/A speed: N/A duplex: N/A mac: 88:78:73:48:20:b9
IF-ID-2: eth1 state: N/A speed: N/A duplex: N/A mac: 38:af:d7:a0:c7:a3
IF-ID-3: eth2 state: N/A speed: N/A duplex: N/A mac: 00:ff:03:b7:7c:4d
IF-ID-4: eth3 state: N/A speed: N/A duplex: N/A mac: 00:15:5d:54:02:d0
IF-ID-5: eth4 state: N/A speed: N/A duplex: N/A mac: b4:bb:9c:56:57:5c
IF-ID-6: wifi0 state: N/A speed: N/A duplex: N/A mac: 88:78:73:48:20:b5
IF-ID-7: wifi1 state: N/A speed: N/A duplex: N/A mac: 88:78:73:48:20:b6
IF-ID-8: wifi2 state: N/A speed: N/A duplex: N/A mac: 8a:78:73:48:20:b5
Drives: Local Storage: total: N/A used: 218.19 GiB
Info: Processes: 9 Uptime: 12d 55m Memory: 11.88 GiB used: 9.74 GiB (82.0%) Init: N/A Shell: