Open alexey-krasnov opened 3 months ago
Hi @alexey-krasnov,
I kept the translate_forward
function as simple as possible for ease of handling within the package. This design allows anyone interested to parallelize the function if needed. Additionally, the model currently accepts only single-line inputs, so handling arrays directly is not feasible.
Kind regards,
Kohulan
Are there any plans to add a batch feature? This would be a significant improvement, and I would really appreciate having this feature as well.
Dear @Kohulan ,
thanks for your explanation. I'll try to check more the possibility of parallelization. I did quick tests by turning off native Tensorflow parallelization:
# Set the number of inter-op parallelism threads
tf.config.threading.set_inter_op_parallelism_threads(1)
# Set the number of intra-op parallelism threads
tf.config.threading.set_intra_op_parallelism_threads(1)
and further implemented ProcessPoolExecutor from concurrent.futures
, however it did not bring any gain in performance. Actually it was even slower than for-loop, probably due to Python expences for parallelization.
Best regards, Aleksei
Dear @alexey-krasnov ,
Thanks for investigating this and I am happy to take pull requests.
Kind regards, Kohulan
Dear @Kohulan,
I'm wondering if it is possible to adjust the model so that it can accept multiple inputs. For example, input might be a batch of smiles / names, therefore increasing the performance of the model.
Right now the only way for multiple inputs is just passing them one by one in a for-loop:
Do you think it is possible to implement as an input a batch (collection of SMILES/names) to have something like that:
Is it feasible by changing input shapes and do necessary preprocessing of input data or the only way is to re-train/fine-tune the model?