wisent 0.5.9__tar.gz → 0.5.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of wisent might be problematic. Click here for more details.
- {wisent-0.5.9 → wisent-0.5.11}/PKG-INFO +1 -1
- wisent-0.5.11/wisent/__init__.py +1 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/models/wisent_model.py +48 -10
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/multi_steering.py +34 -14
- {wisent-0.5.9 → wisent-0.5.11}/wisent.egg-info/PKG-INFO +1 -1
- wisent-0.5.9/wisent/__init__.py +0 -1
- {wisent-0.5.9 → wisent-0.5.11}/LICENSE +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/README.md +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/pyproject.toml +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/setup.cfg +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/setup.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/metrics/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/metrics/core/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/metrics/core/atoms.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/metrics/evaluator.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/metrics/passk.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/output_sanitizer/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/output_sanitizer/core/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/output_sanitizer/core/atoms.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/output_sanitizer/cpp_sanitizer.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/output_sanitizer/java_sanitizer.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/output_sanitizer/python_sanitizer.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/output_sanitizer/utils.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/providers/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/providers/core/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/providers/core/atoms.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/providers/livecodebench/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/providers/livecodebench/provider.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/safe_docker/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/safe_docker/core/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/safe_docker/core/atoms.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/safe_docker/core/runtime.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/safe_docker/entrypoint.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/safe_docker/recipes.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/classifiers/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/classifiers/core/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/classifiers/core/atoms.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/classifiers/models/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/classifiers/models/logistic.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/classifiers/models/mlp.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/classifiers/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/classifiers/classifier_rotator.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/cli_logger.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/data_loaders/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/data_loaders/data_loader_rotator.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/evaluators/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/evaluators/evaluator_rotator.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/steering_methods/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/steering_methods/steering_rotator.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/wisent_cli/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/wisent_cli/commands/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/wisent_cli/commands/help_cmd.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/wisent_cli/commands/listing.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/wisent_cli/commands/train_cmd.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/wisent_cli/main.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/wisent_cli/shell.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/wisent_cli/ui.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/wisent_cli/util/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/wisent_cli/util/aggregations.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/wisent_cli/util/parsing.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/cli/wisent_cli/version.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/activations/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/activations/activations_collector.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/activations/core/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/activations/core/atoms.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/agent/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/agent/budget.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/agent/device_benchmarks.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/agent/diagnose/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/agent/diagnose/agent_classifier_decision.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/agent/diagnose/classifier_marketplace.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/agent/diagnose/create_classifier.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/agent/diagnose/response_diagnostics.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/agent/diagnose/select_classifiers.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/agent/diagnose/synthetic_classifier_option.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/agent/diagnose/tasks/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/agent/diagnose/tasks/task_manager.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/agent/diagnose/tasks/task_relevance.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/agent/diagnose/tasks/task_selector.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/agent/diagnose/test_synthetic_classifier.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/agent/diagnose.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/agent/steer.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/agent/timeout.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/autonomous_agent.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/bigcode_integration.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/core/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/core/atoms.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/core/buliders.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/core/pair.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/core/response.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/core/serialization.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/core/set.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/diagnostics/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/diagnostics/activations.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/diagnostics/base.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/diagnostics/control_vectors.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/diagnostics/coverage.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/diagnostics/divergence.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/diagnostics/duplicates.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/lm_eval_pairs/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/lm_eval_pairs/atoms.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/lm_eval_pairs/lm_extractor_manifest.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/lm_eval_pairs/lm_extractor_registry.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/winogrande.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_pairs_generation.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/data_loaders/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/data_loaders/core/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/data_loaders/core/atoms.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/data_loaders/loaders/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/data_loaders/loaders/custom.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/data_loaders/loaders/lm_loader.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/detection_handling.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/download_full_benchmarks.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/evaluators/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/evaluators/oracles/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/evaluators/oracles/interactive.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/evaluators/oracles/nlp_evaluator.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/evaluators/oracles/user_specified.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/hyperparameter_optimizer.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/lm_eval_harness_ground_truth.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/log_likelihoods_evaluator.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/managed_cached_benchmarks.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/mixed_benchmark_sampler.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/model_config_manager.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/model_persistence.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/models/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/models/core/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/models/core/atoms.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/optuna/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/optuna/classifier/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/optuna/classifier/activation_generator.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/optuna/classifier/classifier_cache.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/optuna/classifier/optuna_classifier_optimizer.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/optuna/steering/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/optuna/steering/bigcode_evaluator_wrapper.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/optuna/steering/data_utils.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/optuna/steering/metrics.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/optuna/steering/optuna_pipeline.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/optuna/steering/steering_optimization.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/parser.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/prompts/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/prompts/core/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/prompts/core/atom.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/prompts/core/prompt_formater.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/prompts/prompt_stratiegies/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/prompts/prompt_stratiegies/direct_completion.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/prompts/prompt_stratiegies/instruction_following.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/prompts/prompt_stratiegies/multiple_choice.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/prompts/prompt_stratiegies/role_playing.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/representation.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/sample_size_optimizer.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/sample_size_optimizer_v2.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/save_results.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/steering.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/steering_method.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/steering_methods/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/steering_methods/core/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/steering_methods/core/atoms.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/steering_methods/methods/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/steering_methods/methods/caa.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/steering_optimizer.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/task_interface.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/task_selector.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/tasks/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/tasks/aime_task.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/tasks/file_task.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/tasks/hle_task.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/tasks/hmmt_task.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/tasks/livecodebench_task.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/tasks/livemathbench_task.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/tasks/lm_eval_task.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/tasks/math500_task.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/tasks/polymath_task.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/tasks/supergpqa_task.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/time_estimator.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/timing_calibration.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/tracking/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/tracking/latency.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/tracking/memory.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/trainers/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/trainers/core/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/trainers/core/atoms.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/trainers/steering_trainer.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/user_model_config.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/utils/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/core/utils/device.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/opti/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/opti/core/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/opti/core/atoms.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/opti/methods/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/opti/methods/opti_classificator.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/opti/methods/opti_steering.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/cleaners/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/cleaners/core/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/cleaners/core/atoms.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/cleaners/deduper_cleaner.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/cleaners/methods/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/cleaners/methods/base_dedupers.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/cleaners/methods/base_refusalers.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/cleaners/methods/core/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/cleaners/methods/core/atoms.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/cleaners/pairs_cleaner.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/cleaners/refusaler_cleaner.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/db_instructions/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/db_instructions/core/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/db_instructions/core/atoms.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/db_instructions/mini_dp.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/generators/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/generators/core/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/generators/core/atoms.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/generators/diversities/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/generators/diversities/core/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/generators/diversities/core/core.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/generators/diversities/methods/__init__.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/generators/diversities/methods/fast_diversity.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent/synthetic/generators/pairs_generator.py +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent.egg-info/SOURCES.txt +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent.egg-info/dependency_links.txt +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent.egg-info/requires.txt +0 -0
- {wisent-0.5.9 → wisent-0.5.11}/wisent.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.5.11"
|
|
@@ -95,6 +95,7 @@ class WisentModel:
|
|
|
95
95
|
elif self.device == "cuda":
|
|
96
96
|
load_kwargs["dtype"] = torch.float16
|
|
97
97
|
load_kwargs["device_map"] = "auto"
|
|
98
|
+
load_kwargs["attn_implementation"] = "flash_attention_2" # Use flash attention for CUDA
|
|
98
99
|
else:
|
|
99
100
|
load_kwargs["dtype"] = torch.float32
|
|
100
101
|
load_kwargs["device_map"] = None
|
|
@@ -336,7 +337,7 @@ class WisentModel:
|
|
|
336
337
|
@torch.inference_mode()
|
|
337
338
|
def generate(
|
|
338
339
|
self,
|
|
339
|
-
inputs: list[list[ChatMessage]],
|
|
340
|
+
inputs: list[list[ChatMessage]] | str,
|
|
340
341
|
max_new_tokens: int = 128,
|
|
341
342
|
temperature: float = 0.7,
|
|
342
343
|
top_p: float = 0.95,
|
|
@@ -345,6 +346,7 @@ class WisentModel:
|
|
|
345
346
|
use_steering: bool = False,
|
|
346
347
|
steering_plan: SteeringPlan | None = None,
|
|
347
348
|
enable_thinking: bool = True,
|
|
349
|
+
prompt_is_formatted: bool = False,
|
|
348
350
|
**gen_kwargs: Any,
|
|
349
351
|
) -> list[str]:
|
|
350
352
|
"""
|
|
@@ -352,7 +354,7 @@ class WisentModel:
|
|
|
352
354
|
|
|
353
355
|
attributes:
|
|
354
356
|
inputs:
|
|
355
|
-
list of chat messages (each a list of {'role','content'} dicts).
|
|
357
|
+
list of chat messages (each a list of {'role','content'} dicts) OR pre-formatted string.
|
|
356
358
|
max_new_tokens:
|
|
357
359
|
max tokens to generate (beyond the prompt).
|
|
358
360
|
temperature:
|
|
@@ -370,6 +372,8 @@ class WisentModel:
|
|
|
370
372
|
If None, uses the internal plan.
|
|
371
373
|
enable_thinking:
|
|
372
374
|
If False, disable thinking/reasoning mode (prevents <think> tags for supported models like Qwen).
|
|
375
|
+
prompt_is_formatted:
|
|
376
|
+
If True, inputs is a pre-formatted string with chat template already applied.
|
|
373
377
|
**gen_kwargs:
|
|
374
378
|
additional kwargs passed to 'model.generate()'.
|
|
375
379
|
|
|
@@ -448,7 +452,22 @@ class WisentModel:
|
|
|
448
452
|
if use_steering:
|
|
449
453
|
self.apply_steering(steering_plan)
|
|
450
454
|
|
|
451
|
-
|
|
455
|
+
if prompt_is_formatted and isinstance(inputs, str):
|
|
456
|
+
# Direct tokenization of pre-formatted prompt
|
|
457
|
+
tokenizer_output = self.tokenizer(
|
|
458
|
+
inputs,
|
|
459
|
+
return_tensors="pt",
|
|
460
|
+
padding=False, # Single prompt, no padding needed
|
|
461
|
+
truncation=True, # Avoid errors on long inputs
|
|
462
|
+
max_length=self.tokenizer.model_max_length # Use model's actual limit
|
|
463
|
+
)
|
|
464
|
+
batch = {
|
|
465
|
+
"input_ids": tokenizer_output["input_ids"],
|
|
466
|
+
"attention_mask": tokenizer_output["attention_mask"]
|
|
467
|
+
}
|
|
468
|
+
else:
|
|
469
|
+
# Current behavior: apply chat template
|
|
470
|
+
batch = self._batch_encode(inputs, add_generation_prompt=True, enable_thinking=enable_thinking)
|
|
452
471
|
|
|
453
472
|
gen_out = self.hf_model.generate(
|
|
454
473
|
**batch,
|
|
@@ -612,7 +631,7 @@ class WisentModel:
|
|
|
612
631
|
@torch.inference_mode()
|
|
613
632
|
def generate_stream(
|
|
614
633
|
self,
|
|
615
|
-
inputs: list[list[ChatMessage]],
|
|
634
|
+
inputs: list[list[ChatMessage]] | str,
|
|
616
635
|
max_new_tokens: int = 128,
|
|
617
636
|
temperature: float = 0.7,
|
|
618
637
|
top_p: float = 0.95,
|
|
@@ -622,6 +641,7 @@ class WisentModel:
|
|
|
622
641
|
skip_prompt: bool = True,
|
|
623
642
|
skip_special_tokens: bool = True,
|
|
624
643
|
enable_thinking: bool = True,
|
|
644
|
+
prompt_is_formatted: bool = False,
|
|
625
645
|
**gen_kwargs: Any,
|
|
626
646
|
) -> Iterable[str]:
|
|
627
647
|
"""
|
|
@@ -630,7 +650,8 @@ class WisentModel:
|
|
|
630
650
|
|
|
631
651
|
attributes:
|
|
632
652
|
inputs:
|
|
633
|
-
list of chat messages (each a list of {'role','content'} dicts)
|
|
653
|
+
list of chat messages (each a list of {'role','content'} dicts) OR pre-formatted string.
|
|
654
|
+
Currently only one conversation is supported.
|
|
634
655
|
max_new_tokens:
|
|
635
656
|
max tokens to generate (beyond the prompt).
|
|
636
657
|
temperature:
|
|
@@ -650,6 +671,8 @@ class WisentModel:
|
|
|
650
671
|
if True, special tokens are removed from the yielded text.
|
|
651
672
|
enable_thinking:
|
|
652
673
|
If False, disable thinking/reasoning mode (prevents <think> tags for supported models like Qwen).
|
|
674
|
+
prompt_is_formatted:
|
|
675
|
+
If True, inputs is a pre-formatted string with chat template already applied.
|
|
653
676
|
**gen_kwargs:
|
|
654
677
|
additional kwargs passed to 'model.generate()'.
|
|
655
678
|
|
|
@@ -657,14 +680,29 @@ class WisentModel:
|
|
|
657
680
|
generated text chunks (str), as they become available.
|
|
658
681
|
"""
|
|
659
682
|
|
|
660
|
-
if len(inputs) != 1:
|
|
661
|
-
raise ValueError(
|
|
662
|
-
f"generate_stream currently supports exactly one conversation at a time (got {len(inputs)})."
|
|
663
|
-
)
|
|
664
683
|
if use_steering:
|
|
665
684
|
self.apply_steering(steering_plan)
|
|
666
685
|
|
|
667
|
-
|
|
686
|
+
if prompt_is_formatted and isinstance(inputs, str):
|
|
687
|
+
# Direct tokenization of pre-formatted prompt
|
|
688
|
+
tokenizer_output = self.tokenizer(
|
|
689
|
+
inputs,
|
|
690
|
+
return_tensors="pt",
|
|
691
|
+
padding=False, # Single prompt, no padding needed
|
|
692
|
+
truncation=True, # Avoid errors on long inputs
|
|
693
|
+
max_length=self.tokenizer.model_max_length # Use model's actual limit
|
|
694
|
+
)
|
|
695
|
+
batch = {
|
|
696
|
+
"input_ids": tokenizer_output["input_ids"],
|
|
697
|
+
"attention_mask": tokenizer_output["attention_mask"]
|
|
698
|
+
}
|
|
699
|
+
else:
|
|
700
|
+
# Current behavior: apply chat template
|
|
701
|
+
if not isinstance(inputs, list) or len(inputs) != 1:
|
|
702
|
+
raise ValueError(
|
|
703
|
+
f"generate_stream currently supports exactly one conversation at a time (got {type(inputs)} with {len(inputs) if isinstance(inputs, list) else 'N/A'} items)."
|
|
704
|
+
)
|
|
705
|
+
batch = self._batch_encode(inputs, add_generation_prompt=True, enable_thinking=enable_thinking)
|
|
668
706
|
|
|
669
707
|
streamer = TextIteratorStreamer(
|
|
670
708
|
self.tokenizer,
|
|
@@ -166,17 +166,19 @@ class MultiSteering:
|
|
|
166
166
|
max_new_tokens: int = 100,
|
|
167
167
|
temperature: float = 0.7,
|
|
168
168
|
top_p: float = 0.9,
|
|
169
|
-
enable_thinking: bool = True
|
|
169
|
+
enable_thinking: bool = True,
|
|
170
|
+
prompt_is_formatted: bool = False
|
|
170
171
|
) -> Iterable[str]:
|
|
171
172
|
"""Apply the combined steering vector to generate text with streaming.
|
|
172
173
|
|
|
173
174
|
Args:
|
|
174
175
|
model: WisentModel instance to use for generation
|
|
175
|
-
prompt: Input prompt
|
|
176
|
+
prompt: Input prompt (either raw text or pre-formatted with chat template)
|
|
176
177
|
max_new_tokens: Maximum tokens to generate
|
|
177
178
|
temperature: Sampling temperature
|
|
178
179
|
top_p: Top-p sampling parameter
|
|
179
180
|
enable_thinking: If False, disable thinking/reasoning mode (prevents <think> tags for supported models like Qwen)
|
|
181
|
+
prompt_is_formatted: If True, prompt already has chat template applied
|
|
180
182
|
|
|
181
183
|
Yields:
|
|
182
184
|
Generated text chunks
|
|
@@ -191,7 +193,8 @@ class MultiSteering:
|
|
|
191
193
|
raise MultiSteeringError("No layer information available")
|
|
192
194
|
|
|
193
195
|
print(f"\n🎯 Applying combined steering vector at layer {self.layer}")
|
|
194
|
-
print(f"Prompt: {prompt}")
|
|
196
|
+
print(f"Prompt: {prompt[:100]}..." if len(prompt) > 100 else f"Prompt: {prompt}")
|
|
197
|
+
print(f"Prompt is formatted: {prompt_is_formatted}")
|
|
195
198
|
print("=" * 50)
|
|
196
199
|
|
|
197
200
|
# Create SteeringPlan from the combined vector
|
|
@@ -202,13 +205,19 @@ class MultiSteering:
|
|
|
202
205
|
normalize=False # Already normalized in combine_vectors
|
|
203
206
|
)
|
|
204
207
|
|
|
205
|
-
#
|
|
206
|
-
|
|
208
|
+
# Handle prompt formatting
|
|
209
|
+
if prompt_is_formatted:
|
|
210
|
+
# Prompt already has chat template applied - pass as string directly
|
|
211
|
+
inputs = prompt
|
|
212
|
+
else:
|
|
213
|
+
# Format prompt as chat messages (current behavior)
|
|
214
|
+
messages: list[ChatMessage] = [{"role": "user", "content": prompt}]
|
|
215
|
+
inputs = [messages]
|
|
207
216
|
|
|
208
217
|
try:
|
|
209
218
|
# Use WisentModel's generate_stream with steering
|
|
210
219
|
yield from model.generate_stream(
|
|
211
|
-
inputs=
|
|
220
|
+
inputs=inputs,
|
|
212
221
|
max_new_tokens=max_new_tokens,
|
|
213
222
|
temperature=temperature,
|
|
214
223
|
top_p=top_p,
|
|
@@ -216,7 +225,8 @@ class MultiSteering:
|
|
|
216
225
|
steering_plan=steering_plan,
|
|
217
226
|
skip_prompt=True,
|
|
218
227
|
skip_special_tokens=True,
|
|
219
|
-
enable_thinking=enable_thinking
|
|
228
|
+
enable_thinking=enable_thinking,
|
|
229
|
+
prompt_is_formatted=prompt_is_formatted
|
|
220
230
|
)
|
|
221
231
|
|
|
222
232
|
except Exception as e:
|
|
@@ -231,17 +241,19 @@ class MultiSteering:
|
|
|
231
241
|
max_new_tokens: int = 100,
|
|
232
242
|
temperature: float = 0.7,
|
|
233
243
|
top_p: float = 0.9,
|
|
234
|
-
enable_thinking: bool = True
|
|
244
|
+
enable_thinking: bool = True,
|
|
245
|
+
prompt_is_formatted: bool = False
|
|
235
246
|
) -> str:
|
|
236
247
|
"""Apply the combined steering vector to generate text (non-streaming).
|
|
237
248
|
|
|
238
249
|
Args:
|
|
239
250
|
model: WisentModel instance to use for generation
|
|
240
|
-
prompt: Input prompt
|
|
251
|
+
prompt: Input prompt (either raw text or pre-formatted with chat template)
|
|
241
252
|
max_new_tokens: Maximum tokens to generate
|
|
242
253
|
temperature: Sampling temperature
|
|
243
254
|
top_p: Top-p sampling parameter
|
|
244
255
|
enable_thinking: If False, disable thinking/reasoning mode (prevents <think> tags for supported models like Qwen)
|
|
256
|
+
prompt_is_formatted: If True, prompt already has chat template applied
|
|
245
257
|
|
|
246
258
|
Returns:
|
|
247
259
|
Generated text
|
|
@@ -256,7 +268,8 @@ class MultiSteering:
|
|
|
256
268
|
raise MultiSteeringError("No layer information available")
|
|
257
269
|
|
|
258
270
|
print(f"\n🎯 Applying combined steering vector at layer {self.layer}")
|
|
259
|
-
print(f"Prompt: {prompt}")
|
|
271
|
+
print(f"Prompt: {prompt[:100]}..." if len(prompt) > 100 else f"Prompt: {prompt}")
|
|
272
|
+
print(f"Prompt is formatted: {prompt_is_formatted}")
|
|
260
273
|
print("=" * 50)
|
|
261
274
|
|
|
262
275
|
# Create SteeringPlan from the combined vector
|
|
@@ -267,19 +280,26 @@ class MultiSteering:
|
|
|
267
280
|
normalize=False # Already normalized in combine_vectors
|
|
268
281
|
)
|
|
269
282
|
|
|
270
|
-
#
|
|
271
|
-
|
|
283
|
+
# Handle prompt formatting
|
|
284
|
+
if prompt_is_formatted:
|
|
285
|
+
# Prompt already has chat template applied - pass as string directly
|
|
286
|
+
inputs = prompt
|
|
287
|
+
else:
|
|
288
|
+
# Format prompt as chat messages (current behavior)
|
|
289
|
+
messages: list[ChatMessage] = [{"role": "user", "content": prompt}]
|
|
290
|
+
inputs = [messages]
|
|
272
291
|
|
|
273
292
|
try:
|
|
274
293
|
# Use WisentModel's generate with steering
|
|
275
294
|
outputs = model.generate(
|
|
276
|
-
inputs=
|
|
295
|
+
inputs=inputs,
|
|
277
296
|
max_new_tokens=max_new_tokens,
|
|
278
297
|
temperature=temperature,
|
|
279
298
|
top_p=top_p,
|
|
280
299
|
use_steering=True,
|
|
281
300
|
steering_plan=steering_plan,
|
|
282
|
-
enable_thinking=enable_thinking
|
|
301
|
+
enable_thinking=enable_thinking,
|
|
302
|
+
prompt_is_formatted=prompt_is_formatted
|
|
283
303
|
)
|
|
284
304
|
|
|
285
305
|
return outputs[0] if outputs else ""
|
wisent-0.5.9/wisent/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.5.9"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wisent-0.5.9 → wisent-0.5.11}/wisent/benchmarks/coding/output_sanitizer/python_sanitizer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/lm_eval_pairs/lm_extractor_manifest.py
RENAMED
|
File without changes
|
{wisent-0.5.9 → wisent-0.5.11}/wisent/core/contrastive_pairs/lm_eval_pairs/lm_extractor_registry.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|